| Property | Value |
| Model name | FightPandemics |
| Technical name | FightPandemics |
| Description | |
| Author | NÃcolas de Araujo |
| Version | 3.1 |
| DB vendor | MongoDB |
| DB version | v4.2 |
| Comments |
| Field | Type | Req | Key | Description | Comments |
| coordinates | array | true | Array with the coordinates, specifying longitude first and latitude second, as default in the GeoJSON definition. | ||
| type | string | true | Type of the GeoJSON Object. Please refer to the official documentation for more information. In our case, the value will always be of the type "Point". | ||
| country | string | false | String holding the country's name. | ||
| city | string | false | String holding the city's name. | ||
| neighborhood | string | false | String holding the neighborhood's name. | ||
| address | string | false | String holding the address (street, number and other details). |
| Property | Value |
| Name | location |
| Technical name | |
| Id | |
| Type | document |
| Description | Location document according to the norms of a GeoJSON Object. The fields address, neighborhood, city, state and country are added to store the result of the geoprocessing. |
| Dependencies | |
| Required | false |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| DBRef | |
| Min Properties | |
| Max Properties | |
| Additional properties | false |
| Comments |
| Field | Type | Req | Key | Description | Comments |
| [0] | numeric | false | Location longitude | ||
| [1] | numeric | false | Location latitude |
| Property | Value |
| Name | coordinates |
| Technical name | |
| Id | |
| Type | array |
| Description | Array with the coordinates, specifying longitude first and latitude second, as default in the GeoJSON definition. |
| Dependencies | |
| Required | true |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Min items | 2 |
| Max items | 2 |
| Unique items | false |
| Additional items | true |
| Comments |
| Property | Value |
| Display name | |
| Id | lng |
| Type | numeric |
| Subtype | |
| Description | Location longitude |
| Dependencies | |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | 0 |
| Unit | degrees |
| Min value | -180 |
| Excl min | false |
| Max value | 180 |
| Excl max | false |
| Multiple of | |
| Divisible by | |
| Enum | |
| Sample | 35.26 |
| Comments |
| Property | Value |
| Display name | |
| Id | lat |
| Type | numeric |
| Subtype | |
| Description | Location latitude |
| Dependencies | |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | 0 |
| Unit | degrees |
| Min value | -90 |
| Excl min | false |
| Max value | 90 |
| Excl max | false |
| Multiple of | |
| Divisible by | |
| Enum | |
| Sample | -32.83 |
| Comments |
| Property | Value |
| Name | type |
| Technical name | |
| Id | |
| Type | string |
| Description | Type of the GeoJSON Object. Please refer to the official documentation for more information. In our case, the value will always be of the type "Point". |
| Dependencies | |
| Required | true |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Min length | |
| Max length | |
| Pattern | |
| Format | |
| Enum | Point |
| Sample | |
| Comments |
| Property | Value |
| Name | country |
| Technical name | |
| Id | |
| Type | string |
| Description | String holding the country's name. |
| Dependencies | |
| Required | false |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Min length | |
| Max length | |
| Pattern | |
| Format | |
| Enum | |
| Sample | |
| Comments |
| Property | Value |
| Name | city |
| Technical name | |
| Id | |
| Type | string |
| Description | String holding the city's name. |
| Dependencies | |
| Required | false |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Min length | |
| Max length | |
| Pattern | |
| Format | |
| Enum | |
| Sample | |
| Comments |
| Property | Value |
| Name | neighborhood |
| Technical name | |
| Id | |
| Type | string |
| Description | String holding the neighborhood's name. |
| Dependencies | |
| Required | false |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Min length | |
| Max length | |
| Pattern | |
| Format | |
| Enum | |
| Sample | |
| Comments |
| Property | Value |
| Name | address |
| Technical name | |
| Id | |
| Type | string |
| Description | String holding the address (street, number and other details). |
| Dependencies | |
| Required | false |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Min length | |
| Max length | |
| Pattern | |
| Format | |
| Enum | |
| Sample | |
| Comments |
| Field | Type | Req | Key | Description | Comments |
| id | objectId | true | fk | Foreign key to the user who created the post. | |
| name | string | true | |||
| type | string | true | |||
| location | reference | true |
| Property | Value |
| Name | author |
| Technical name | |
| Id | |
| Type | document |
| Description | |
| Dependencies | |
| Required | true |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| DBRef | |
| Min Properties | |
| Max Properties | |
| Additional properties | false |
| Comments |
| Property | Value |
| Name | name |
| Technical name | |
| Id | |
| Type | string |
| Description | |
| Dependencies | |
| Required | true |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Min length | |
| Max length | |
| Pattern | |
| Format | |
| Enum | |
| Sample | |
| Comments |
| Property | Value |
| Name | type |
| Technical name | |
| Id | |
| Type | string |
| Description | |
| Dependencies | |
| Required | true |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Min length | |
| Max length | |
| Pattern | |
| Format | |
| Enum | |
| Sample | |
| Comments |
| Property | Value |
| Name | location |
| Technical name | |
| $ref | #model/definitions/location |
| Reference type | model |
| Reference description |
| Field | Type | Req | Key | Description | Comments |
| id | objectId | true | |||
| objective | string | true | Field to indicate the post's objective. Currently only two values allowed: "offering help" and "looking for help". | ||
| title | string | true | The post title. | ||
| content | string | true | String for the post content. | ||
| author | reference | true |
| Property | Value |
| Name | postRef |
| Technical name | |
| Id | |
| Type | document |
| Description | Optional post reference, allowing a post to be referenced in a message thread. |
| Dependencies | |
| Required | false |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| DBRef | |
| Min Properties | |
| Max Properties | |
| Additional properties | false |
| Comments |
| Property | Value |
| Name | id |
| Technical name | |
| Id | |
| Type | objectId |
| Description | |
| Dependencies | |
| Required | true |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Sample | |
| Comments |
| Property | Value |
| Name | objective |
| Technical name | |
| Id | |
| Type | string |
| Description | Field to indicate the post's objective. Currently only two values allowed: "offering help" and "looking for help". |
| Dependencies | |
| Required | true |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Min length | |
| Max length | |
| Pattern | |
| Format | |
| Enum | request,offer |
| Sample | offer |
| Comments |
| Property | Value |
| Name | title |
| Technical name | |
| Id | |
| Type | string |
| Description | The post title. |
| Dependencies | |
| Required | true |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Min length | |
| Max length | |
| Pattern | |
| Format | |
| Enum | |
| Sample | |
| Comments |
| Property | Value |
| Name | content |
| Technical name | |
| Id | |
| Type | string |
| Description | String for the post content. |
| Dependencies | |
| Required | true |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Min length | |
| Max length | |
| Pattern | |
| Format | |
| Enum | |
| Sample | |
| Comments |
| Property | Value |
| Name | author |
| Technical name | |
| $ref | #model/definitions/author |
| Reference type | model |
| Reference description |
| Property | Value |
| Database name | applicationDB |
| Technical name | |
| Enable sharding | |
| Description | |
| Comments |
| Property | Value |
| Collection name | comments |
| Technical name | |
| Id | |
| Description | |
| Database | applicationDB |
| Capped | false |
| Size | |
| Max | |
| Storage engine | WiredTiger |
| Config String | |
| Validation level | Off |
| Validation action | Warn |
| Additional properties | false |
| Comments |
| Field | Type | Req | Key | Description | Comments |
| _id | objectId | true | Automatically generated object_id as primary key. | ||
| createdAt | date | true | Timestamp with the comment's creation date | ||
| updatedAt | date | true | Timestamp with the comment's last update date | ||
| author | document | true | |||
| id | objectId | true | Foreign key to the user who created the post. | ||
| name | string | true | |||
| type | string | true | |||
| location | document | true | Location document according to the norms of a GeoJSON Object. The fields address, neighborhood, city, state and country are added to store the result of the geoprocessing. | ||
| coordinates | array | true | Array with the coordinates, specifying longitude first and latitude second, as default in the GeoJSON definition. | ||
| [0] | numeric | false | Location longitude | ||
| [1] | numeric | false | Location latitude | ||
| type | string | true | Type of the GeoJSON Object. Please refer to the official documentation for more information. In our case, the value will always be of the type "Point". | ||
| country | string | false | String holding the country's name. | ||
| city | string | false | String holding the city's name. | ||
| neighborhood | string | false | String holding the neighborhood's name. | ||
| address | string | false | String holding the address (street, number and other details). | ||
| postId | objectId | true | |||
| parentId | objectId | false | If the comment is nested (in another comment), this field will hold the _id of the parent comment. Optional field, where being blank means it is a root comment. | ||
| content | string | true | Stirng holding the comment's content. | ||
| likes | array | false | Array holding the user_id of all the users who liked the comment. | ||
| [0] | objectId | false | _id of the user who liked the comment |
| Property | Value |
| Name | _id |
| Technical name | |
| Id | |
| Type | objectId |
| Description | Automatically generated object_id as primary key. |
| Dependencies | |
| Required | true |
| Primary key | true |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Sample | |
| Comments |
| Property | Value |
| Name | createdAt |
| Technical name | |
| Id | |
| Type | date |
| Description | Timestamp with the comment's creation date |
| Dependencies | |
| Required | true |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Sample | |
| Comments |
| Property | Value |
| Name | updatedAt |
| Technical name | |
| Id | |
| Type | date |
| Description | Timestamp with the comment's last update date |
| Dependencies | |
| Required | true |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Sample | |
| Comments |
| Property | Value |
| Name | author |
| Technical name | |
| $ref | #model/definitions/author |
| Reference type | model |
| Reference description |
| Property | Value |
| Name | postId |
| Technical name | |
| Id | |
| Type | objectId |
| Description | |
| Dependencies | |
| Required | true |
| Primary key | false |
| Foreign collection | posts |
| Foreign field | |
| Relationship type | |
| Default | |
| Sample | |
| Comments |
| Property | Value |
| Name | parentId |
| Technical name | |
| Id | |
| Type | objectId |
| Description | If the comment is nested (in another comment), this field will hold the _id of the parent comment. Optional field, where being blank means it is a root comment. |
| Dependencies | |
| Required | false |
| Primary key | false |
| Foreign collection | comments |
| Foreign field | _id |
| Relationship type | Foreign Key |
| Default | |
| Sample | |
| Comments |
| Property | Value |
| Name | content |
| Technical name | |
| Id | |
| Type | string |
| Description | Stirng holding the comment's content. |
| Dependencies | |
| Required | true |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Min length | |
| Max length | |
| Pattern | |
| Format | |
| Enum | |
| Sample | |
| Comments |
| Field | Type | Req | Key | Description | Comments |
| [0] | objectId | false | fk | _id of the user who liked the comment |
| Property | Value |
| Name | likes |
| Technical name | |
| Id | |
| Type | array |
| Description | Array holding the user_id of all the users who liked the comment. |
| Dependencies | |
| Required | false |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Min items | |
| Max items | |
| Unique items | true |
| Additional items | true |
| Comments |
| Property | Value |
| Display name | |
| Id | |
| Type | objectId |
| Description | _id of the user who liked the comment |
| Dependencies | |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | Foreign Key |
| Default | |
| Sample | |
| Comments |
| Property | New Index |
| Name | New Index |
| Key | createdAt('ascending'), parentId('ascending'), postId('ascending') |
| Hashed | |
| Unique | |
| Drop duplicates | |
| Sparse | |
| Background indexing | |
| Partial filter exp | |
| Expire after (seconds) | |
| Storage engine | WiredTiger |
| Comments |
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"title": "comments",
"additionalProperties": false,
"properties": {
"_id": {
"type": "string",
"description": "Automatically generated object_id as primary key.",
"pattern": "^[a-fA-F0-9]{24}$"
},
"createdAt": {
"type": "string",
"description": "Timestamp with the comment's creation date",
"format": "date-time"
},
"updatedAt": {
"type": "string",
"description": "Timestamp with the comment's last update date",
"format": "date-time"
},
"author": {
"$ref": "#model/definitions/author"
},
"postId": {
"type": "string",
"pattern": "^[a-fA-F0-9]{24}$"
},
"parentId": {
"type": "string",
"description": "If the comment is nested (in another comment), this field will hold the _id of the parent comment. Optional field, where being blank means it is a root comment.",
"pattern": "^[a-fA-F0-9]{24}$"
},
"content": {
"type": "string",
"description": "Stirng holding the comment's content."
},
"likes": {
"type": "array",
"description": "Array holding the user_id of all the users who liked the comment.",
"additionalItems": true,
"uniqueItems": true,
"items": {
"type": "string",
"description": "_id of the user who liked the comment",
"pattern": "^[a-fA-F0-9]{24}$"
}
}
},
"required": [
"_id",
"createdAt",
"updatedAt",
"author",
"postId",
"content"
]
}{
"_id": ObjectId("507f1f77bcf86cd799439011"),
"createdAt": ISODate("2016-04-08T15:06:21.595Z"),
"updatedAt": ISODate("2016-04-08T15:06:21.595Z"),
"author": {
"id": ObjectId("507f1f77bcf86cd799439011"),
"name": "Lorem",
"type": "Lorem",
"location": {
"coordinates": [
35.26,
-32.83
],
"type": "Point",
"country": "Lorem",
"city": "Lorem",
"neighborhood": "Lorem",
"address": "Lorem"
}
},
"postId": ObjectId("507f1f77bcf86cd799439011"),
"parentId": ObjectId("507f1f77bcf86cd799439011"),
"content": "Lorem",
"likes": [
ObjectId("507f1f77bcf86cd799439011")
]
}use applicationDB;
db.createCollection( "comments",{
"storageEngine": {
"wiredTiger": {}
},
"capped": false,
"validator": {
"$jsonSchema": {
"bsonType": "object",
"title": "comments",
"additionalProperties": false,
"properties": {
"_id": {
"bsonType": "objectId",
"description": "Automatically generated object_id as primary key."
},
"createdAt": {
"bsonType": "date",
"description": "Timestamp with the comment's creation date"
},
"updatedAt": {
"bsonType": "date",
"description": "Timestamp with the comment's last update date"
},
"author": {
"bsonType": "object",
"properties": {
"id": {
"bsonType": "objectId",
"description": "Foreign key to the user who created the post."
},
"name": {
"bsonType": "string"
},
"type": {
"bsonType": "string"
},
"location": {
"bsonType": "object",
"description": "Location document according to the norms of a [GeoJSON Object](https://docs.mongodb.com/manual/reference/geojson/ ).\nThe fields address, neighborhood, city, state and country are added to store the result of the geoprocessing.",
"properties": {
"coordinates": {
"bsonType": "array",
"description": "Array with the coordinates, specifying **longitude first** and **latitude second**, as default in the [GeoJSON](https://docs.mongodb.com/manual/reference/geojson/) definition.",
"additionalItems": true,
"minItems": 2,
"maxItems": 2,
"uniqueItems": false,
"items": [
{
"bsonType": "number",
"description": "Location longitude\n",
"minimum": -180,
"maximum": 180
},
{
"bsonType": "number",
"description": "Location latitude\n",
"minimum": -90,
"maximum": 90
}
]
},
"type": {
"bsonType": "string",
"description": "Type of the GeoJSON Object.\nPlease refer to the [official documentation](https://docs.mongodb.com/manual/reference/geojson/ ) for more information.\n\n**In our case, the value will always be of the type \"Point\".**",
"enum": [
"Point"
]
},
"country": {
"bsonType": "string",
"description": "String holding the country's name.\n"
},
"city": {
"bsonType": "string",
"description": "String holding the city's name."
},
"neighborhood": {
"bsonType": "string",
"description": "String holding the neighborhood's name."
},
"address": {
"bsonType": "string",
"description": "String holding the address (street, number and other details)."
}
},
"additionalProperties": false,
"required": [
"coordinates",
"type"
]
}
},
"additionalProperties": false,
"required": [
"id",
"name",
"type"
]
},
"postId": {
"bsonType": "objectId"
},
"parentId": {
"bsonType": "objectId",
"description": "If the comment is nested (in another comment), this field will hold the _id of the parent comment. Optional field, where being blank means it is a root comment."
},
"content": {
"bsonType": "string",
"description": "Stirng holding the comment's content."
},
"likes": {
"bsonType": "array",
"description": "Array holding the user_id of all the users who liked the comment.",
"additionalItems": true,
"uniqueItems": true,
"items": {
"bsonType": "objectId",
"description": "_id of the user who liked the comment"
}
}
},
"required": [
"_id",
"createdAt",
"updatedAt",
"author",
"postId",
"content"
]
}
},
"validationLevel": "off",
"validationAction": "warn"
});
db.comments.createIndex(
{
"createdAt": 1,
"parentId": 1,
"postId": 1
},
{
"name": "New Index"
}
);| Property | Value |
| Collection name | feedbacks |
| Technical name | |
| Id | |
| Description | Collection to hold feedback on the application. This may be done with the user logged or not and, depending on that, we may or may not have a reference to the user in question at this model. |
| Database | applicationDB |
| Capped | false |
| Size | |
| Max | |
| Storage engine | WiredTiger |
| Config String | |
| Validation level | Off |
| Validation action | Warn |
| Additional properties | false |
| Comments |
| Field | Type | Req | Key | Description | Comments |
| _id | objectId | true | Automatically generated object_id as primary key. | ||
| createdAt | date | true | Timestamp with the feedback's creation date | ||
| updatedAt | date | true | Timestamp with the feedback's last update date | ||
| rating | numeric | true | A rating, in a scale of 1 to 5, of the application. Currently present as: "How well does FIghtPandemics meet your needs?". Present in the first part of the feedback and, therefore, is required. | ||
| ipAddress | ipv4 | true | Caputred IP address in order to get user's location even if they are not logged. Captured at the first part of the feedback and, therefore, is required. | ||
| age | integer64 | false | User's age. Currently present as: "What is your age?". Present in the third part of the feedback and, therefore, not required. | ||
| mostValuableFeature | string | false | User's feedback into what is the features most valuable for him/her. Currently present as: "Which features are the most valuable for you?". Present in the second part of the feedback and, therefore, not required. | ||
| whatWouldChange | string | false | User's feedback into what he/she would change about the application. Currently present as: "If you could change one thing about FightPandemics, what would it be?". Present in the second part of the feedback and, therefore, not required. | ||
| generalFeedback | string | false | User's general feedback section. Currently present as: "Any other feedback for us?". Present in the second part of the feedback and, therefore, not required. | ||
| covidImpact | string | false | User's feedback into how the COVID impacted him. Currently present as a multiple choice question. Question: "How has COVID-19 impacted you?" Options:
Present in the second part of the feedback and, therefore, not required. | ||
| userId | objectId | false | Reference to the user's _id. This will be present only if the user was logged in when completing the feedback. | ||
| location | document | false | Location document according to the norms of a GeoJSON Object. The fields address, neighborhood, city, state and country are added to store the result of the geoprocessing. | ||
| coordinates | array | true | Array with the coordinates, specifying longitude first and latitude second, as default in the GeoJSON definition. | ||
| [0] | numeric | false | Location longitude | ||
| [1] | numeric | false | Location latitude | ||
| type | string | true | Type of the GeoJSON Object. Please refer to the official documentation for more information. In our case, the value will always be of the type "Point". | ||
| country | string | false | String holding the country's name. | ||
| city | string | false | String holding the city's name. | ||
| neighborhood | string | false | String holding the neighborhood's name. | ||
| address | string | false | String holding the address (street, number and other details). |
| Property | Value |
| Name | createdAt |
| Technical name | |
| Id | |
| Type | date |
| Description | Timestamp with the feedback's creation date |
| Dependencies | |
| Required | true |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Sample | |
| Comments |
| Property | Value |
| Name | _id |
| Technical name | |
| Id | |
| Type | objectId |
| Description | Automatically generated object_id as primary key. |
| Dependencies | |
| Required | true |
| Primary key | true |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Sample | |
| Comments |
| Property | Value |
| Name | updatedAt |
| Technical name | |
| Id | |
| Type | date |
| Description | Timestamp with the feedback's last update date |
| Dependencies | |
| Required | true |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Sample | |
| Comments |
| Property | Value |
| Name | rating |
| Technical name | |
| Id | |
| Type | numeric |
| Subtype | |
| Description | A rating, in a scale of 1 to 5, of the application. Currently present as: "How well does FIghtPandemics meet your needs?". Present in the first part of the feedback and, therefore, is required. |
| Dependencies | |
| Required | true |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Unit | |
| Min value | 1 |
| Excl min | false |
| Max value | 5 |
| Excl max | false |
| Multiple of | |
| Divisible by | |
| Enum | |
| Sample | |
| Comments |
| Property | Value |
| Name | ipAddress |
| Technical name | |
| Id | |
| Type | string |
| Description | Caputred IP address in order to get user's location even if they are not logged. Captured at the first part of the feedback and, therefore, is required. |
| Dependencies | |
| Required | true |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Min length | |
| Max length | |
| Pattern | |
| Format | ipv4 |
| Enum | |
| Sample | |
| Comments |
| Property | Value |
| Name | age |
| Technical name | |
| Id | |
| Type | numeric |
| Subtype | integer64 |
| Description | User's age. Currently present as: "What is your age?". Present in the third part of the feedback and, therefore, not required. |
| Dependencies | |
| Required | false |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Unit | |
| Min value | 18 |
| Excl min | false |
| Max value | |
| Excl max | false |
| Multiple of | |
| Divisible by | |
| Enum | |
| Sample | |
| Comments |
| Property | Value |
| Name | mostValuableFeature |
| Technical name | |
| Id | |
| Type | string |
| Description | User's feedback into what is the features most valuable for him/her. Currently present as: "Which features are the most valuable for you?". Present in the second part of the feedback and, therefore, not required. |
| Dependencies | |
| Required | false |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Min length | |
| Max length | |
| Pattern | |
| Format | |
| Enum | |
| Sample | |
| Comments |
| Property | Value |
| Name | whatWouldChange |
| Technical name | |
| Id | |
| Type | string |
| Description | User's feedback into what he/she would change about the application. Currently present as: "If you could change one thing about FightPandemics, what would it be?". Present in the second part of the feedback and, therefore, not required. |
| Dependencies | |
| Required | false |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Min length | |
| Max length | |
| Pattern | |
| Format | |
| Enum | |
| Sample | |
| Comments |
| Property | Value |
| Name | generalFeedback |
| Technical name | |
| Id | |
| Type | string |
| Description | User's general feedback section. Currently present as: "Any other feedback for us?". Present in the second part of the feedback and, therefore, not required. |
| Dependencies | |
| Required | false |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Min length | |
| Max length | |
| Pattern | |
| Format | |
| Enum | |
| Sample | |
| Comments |
| Property | Value |
| Name | covidImpact |
| Technical name | |
| Id | |
| Type | string |
| Description | User's feedback into how the COVID impacted him. Currently present as a multiple choice question. Question: "How has COVID-19 impacted you?" Options:
Present in the second part of the feedback and, therefore, not required. |
| Dependencies | |
| Required | false |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Min length | |
| Max length | |
| Pattern | |
| Format | |
| Enum | |
| Sample | |
| Comments |
| Property | Value |
| Name | userId |
| Technical name | |
| Id | |
| Type | objectId |
| Description | Reference to the user's _id. This will be present only if the user was logged in when completing the feedback. |
| Dependencies | |
| Required | false |
| Primary key | false |
| Foreign collection | users |
| Foreign field | _id |
| Relationship type | Foreign Key |
| Default | |
| Sample | |
| Comments |
| Property | Value |
| Name | location |
| Technical name | |
| $ref | #model/definitions/location |
| Reference type | model |
| Reference description |
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"title": "feedbacks",
"description": "Collection to hold feedback on the application.\n\nThis may be done with the user logged or not and, depending on that, we may or may not have a reference to the user in question at this model.",
"additionalProperties": false,
"properties": {
"createdAt": {
"type": "string",
"description": "Timestamp with the feedback's creation date",
"format": "date-time"
},
"_id": {
"type": "string",
"description": "Automatically generated object_id as primary key.",
"pattern": "^[a-fA-F0-9]{24}$"
},
"updatedAt": {
"type": "string",
"description": "Timestamp with the feedback's last update date",
"format": "date-time"
},
"rating": {
"type": "number",
"description": "A rating, in a scale of 1 to 5, of the application.\n\nCurrently present as: \"How well does FIghtPandemics meet your needs?\".\n\nPresent in the first part of the feedback and, therefore, is required.",
"minimum": 1,
"maximum": 5
},
"ipAddress": {
"type": "string",
"description": "Caputred IP address in order to get user's location even if they are not logged.\n\nCaptured at the first part of the feedback and, therefore, is required.",
"format": "ipv4"
},
"age": {
"type": "integer",
"description": "User's age.\n\nCurrently present as: \"What is your age?\".\n\nPresent in the third part of the feedback and, therefore, not required.",
"minimum": 18
},
"mostValuableFeature": {
"type": "string",
"description": "User's feedback into what is the features most valuable for him/her.\n\nCurrently present as: \"Which features are the most valuable for you?\".\n\nPresent in the second part of the feedback and, therefore, not required."
},
"whatWouldChange": {
"type": "string",
"description": "User's feedback into what he/she would change about the application.\n\nCurrently present as: \"If you could change one thing about FightPandemics, what would it be?\".\n\nPresent in the second part of the feedback and, therefore, not required."
},
"generalFeedback": {
"type": "string",
"description": "User's general feedback section.\n\nCurrently present as: \"Any other feedback for us?\".\n\nPresent in the second part of the feedback and, therefore, not required."
},
"covidImpact": {
"type": "string",
"description": "User's feedback into how the COVID impacted him.\n\nCurrently present as a multiple choice question.\n\n**Question:** \"How has COVID-19 impacted you?\"\n\n**Options:** \n\n1. I go to work/school normally\n2. I am healthy but in a stay-at-home quarentine\n3. I have mild symptoms but haven't been tested\n4. I am diagnosed with COVID-19\n\n\nPresent in the second part of the feedback and, therefore, not required."
},
"userId": {
"type": "string",
"description": "Reference to the user's _id.\n\nThis will be present only if the user was logged in when completing the feedback.",
"pattern": "^[a-fA-F0-9]{24}$"
},
"location": {
"$ref": "#model/definitions/location"
}
},
"required": [
"createdAt",
"_id",
"updatedAt",
"rating",
"ipAddress"
]
}{
"createdAt": ISODate("2016-04-08T15:06:21.595Z"),
"_id": ObjectId("507f1f77bcf86cd799439011"),
"updatedAt": ISODate("2016-04-08T15:06:21.595Z"),
"rating": 1,
"ipAddress": "192.168.0.1",
"age": 8528994625872795000,
"mostValuableFeature": "Lorem",
"whatWouldChange": "Lorem",
"generalFeedback": "Lorem",
"covidImpact": "Lorem",
"userId": ObjectId("507f1f77bcf86cd799439011"),
"location": {
"coordinates": [
35.26,
-32.83
],
"type": "Point",
"country": "Lorem",
"city": "Lorem",
"neighborhood": "Lorem",
"address": "Lorem"
}
}use applicationDB;
db.createCollection( "feedbacks",{
"storageEngine": {
"wiredTiger": {}
},
"capped": false,
"validator": {
"$jsonSchema": {
"bsonType": "object",
"title": "feedbacks",
"description": "Collection to hold feedback on the application.\n\nThis may be done with the user logged or not and, depending on that, we may or may not have a reference to the user in question at this model.",
"additionalProperties": false,
"properties": {
"_id": {
"bsonType": "objectId",
"description": "Automatically generated object_id as primary key."
},
"createdAt": {
"bsonType": "date",
"description": "Timestamp with the feedback's creation date"
},
"updatedAt": {
"bsonType": "date",
"description": "Timestamp with the feedback's last update date"
},
"rating": {
"bsonType": "number",
"description": "A rating, in a scale of 1 to 5, of the application.\n\nCurrently present as: \"How well does FIghtPandemics meet your needs?\".\n\nPresent in the first part of the feedback and, therefore, is required.",
"minimum": 1,
"maximum": 5
},
"ipAddress": {
"bsonType": "string",
"description": "Caputred IP address in order to get user's location even if they are not logged.\n\nCaptured at the first part of the feedback and, therefore, is required."
},
"age": {
"bsonType": "long",
"description": "User's age.\n\nCurrently present as: \"What is your age?\".\n\nPresent in the third part of the feedback and, therefore, not required.",
"minimum": 18
},
"mostValuableFeature": {
"bsonType": "string",
"description": "User's feedback into what is the features most valuable for him/her.\n\nCurrently present as: \"Which features are the most valuable for you?\".\n\nPresent in the second part of the feedback and, therefore, not required."
},
"whatWouldChange": {
"bsonType": "string",
"description": "User's feedback into what he/she would change about the application.\n\nCurrently present as: \"If you could change one thing about FightPandemics, what would it be?\".\n\nPresent in the second part of the feedback and, therefore, not required."
},
"generalFeedback": {
"bsonType": "string",
"description": "User's general feedback section.\n\nCurrently present as: \"Any other feedback for us?\".\n\nPresent in the second part of the feedback and, therefore, not required."
},
"covidImpact": {
"bsonType": "string",
"description": "User's feedback into how the COVID impacted him.\n\nCurrently present as a multiple choice question.\n\n**Question:** \"How has COVID-19 impacted you?\"\n\n**Options:** \n\n1. I go to work/school normally\n2. I am healthy but in a stay-at-home quarentine\n3. I have mild symptoms but haven't been tested\n4. I am diagnosed with COVID-19\n\n\nPresent in the second part of the feedback and, therefore, not required."
},
"userId": {
"bsonType": "objectId",
"description": "Reference to the user's _id.\n\nThis will be present only if the user was logged in when completing the feedback."
},
"location": {
"bsonType": "object",
"description": "Location document according to the norms of a [GeoJSON Object](https://docs.mongodb.com/manual/reference/geojson/ ).\nThe fields address, neighborhood, city, state and country are added to store the result of the geoprocessing.",
"properties": {
"coordinates": {
"bsonType": "array",
"description": "Array with the coordinates, specifying **longitude first** and **latitude second**, as default in the [GeoJSON](https://docs.mongodb.com/manual/reference/geojson/) definition.",
"additionalItems": true,
"minItems": 2,
"maxItems": 2,
"uniqueItems": false,
"items": [
{
"bsonType": "number",
"description": "Location longitude\n",
"minimum": -180,
"maximum": 180
},
{
"bsonType": "number",
"description": "Location latitude\n",
"minimum": -90,
"maximum": 90
}
]
},
"type": {
"bsonType": "string",
"description": "Type of the GeoJSON Object.\nPlease refer to the [official documentation](https://docs.mongodb.com/manual/reference/geojson/ ) for more information.\n\n**In our case, the value will always be of the type \"Point\".**",
"enum": [
"Point"
]
},
"country": {
"bsonType": "string",
"description": "String holding the country's name.\n"
},
"city": {
"bsonType": "string",
"description": "String holding the city's name."
},
"neighborhood": {
"bsonType": "string",
"description": "String holding the neighborhood's name."
},
"address": {
"bsonType": "string",
"description": "String holding the address (street, number and other details)."
}
},
"additionalProperties": false,
"required": [
"coordinates",
"type"
]
}
},
"required": [
"createdAt",
"_id",
"updatedAt",
"rating",
"ipAddress"
]
}
},
"validationLevel": "off",
"validationAction": "warn"
});| Property | Value |
| Collection name | messages |
| Technical name | |
| Id | |
| Description | Message sent in a private conversation |
| Database | applicationDB |
| Capped | false |
| Size | |
| Max | |
| Storage engine | WiredTiger |
| Config String | |
| Validation level | Off |
| Validation action | Warn |
| Additional properties | false |
| Comments |
| Field | Type | Req | Key | Description | Comments |
| _id | objectId | true | ObjectId used as primary key for a message | ||
| createdAt | date | true | Timestamp with message's creation date | ||
| updatedAt | date | true | Timestamp with message's update date | ||
| authorId | objectId | true | ObjectId of the user who sent the message | ||
| content | string | true | Messages content, containing html links and emojis | ||
| threadId | objectId | true | Reference to the thread were the message was sent | ||
| status | string | true | Curerent message status, used to define if it was edited or deleted:
| ||
| postRef | document | false | Optional post reference, allowing a post to be referenced in a message thread. | ||
| id | objectId | true | |||
| objective | string | true | Field to indicate the post's objective. Currently only two values allowed: "offering help" and "looking for help". | ||
| title | string | true | The post title. | ||
| content | string | true | String for the post content. | ||
| author | document | true | |||
| id | objectId | true | Foreign key to the user who created the post. | ||
| name | string | true | |||
| type | string | true | |||
| location | document | true | Location document according to the norms of a GeoJSON Object. The fields address, neighborhood, city, state and country are added to store the result of the geoprocessing. | ||
| coordinates | array | true | Array with the coordinates, specifying longitude first and latitude second, as default in the GeoJSON definition. | ||
| [0] | numeric | false | Location longitude | ||
| [1] | numeric | false | Location latitude | ||
| type | string | true | Type of the GeoJSON Object. Please refer to the official documentation for more information. In our case, the value will always be of the type "Point". | ||
| country | string | false | String holding the country's name. | ||
| city | string | false | String holding the city's name. | ||
| neighborhood | string | false | String holding the neighborhood's name. | ||
| address | string | false | String holding the address (street, number and other details). |
| Property | Value |
| Name | _id |
| Technical name | |
| Id | |
| Type | objectId |
| Description | ObjectId used as primary key for a message |
| Dependencies | |
| Required | true |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Sample | |
| Comments |
| Property | Value |
| Name | createdAt |
| Technical name | |
| Id | |
| Type | date |
| Description | Timestamp with message's creation date |
| Dependencies | |
| Required | true |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Sample | |
| Comments |
| Property | Value |
| Name | updatedAt |
| Technical name | |
| Id | |
| Type | date |
| Description | Timestamp with message's update date |
| Dependencies | |
| Required | true |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Sample | |
| Comments |
| Property | Value |
| Name | content |
| Technical name | |
| Id | |
| Type | string |
| Description | Messages content, containing html links and emojis |
| Dependencies | |
| Required | true |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Min length | |
| Max length | |
| Pattern | |
| Format | |
| Enum | |
| Sample | |
| Comments |
| Property | Value |
| Name | status |
| Technical name | |
| Id | |
| Type | string |
| Description | Curerent message status, used to define if it was edited or deleted:
|
| Dependencies | |
| Required | true |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | sent |
| Min length | |
| Max length | |
| Pattern | |
| Format | |
| Enum | edited,deleted,sent |
| Sample | |
| Comments |
| Property | Value |
| Name | postRef |
| Technical name | |
| $ref | #model/definitions/postRef |
| Reference type | model |
| Reference description |
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"title": "messages",
"description": "Message sent in a private conversation\n",
"additionalProperties": false,
"properties": {
"_id": {
"type": "string",
"description": "ObjectId used as primary key for a message",
"pattern": "^[a-fA-F0-9]{24}$"
},
"createdAt": {
"type": "string",
"description": "Timestamp with message's creation date",
"format": "date-time"
},
"updatedAt": {
"type": "string",
"description": "Timestamp with message's update date",
"format": "date-time"
},
"authorId": {
"type": "string",
"description": "ObjectId of the user who sent the message",
"pattern": "^[a-fA-F0-9]{24}$"
},
"content": {
"type": "string",
"description": "Messages content, containing html links and emojis "
},
"threadId": {
"type": "string",
"description": "Reference to the thread were the message was sent",
"pattern": "^[a-fA-F0-9]{24}$"
},
"status": {
"type": "string",
"description": "Curerent message status, used to define if it was edited or deleted:\n\n* **sent**: message was sent and not edited or deleted.\n* **edited**: message was edited by the author\n* **deleted**: message was deleted by the author",
"default": "sent",
"enum": [
"edited",
"deleted",
"sent"
]
},
"postRef": {
"$ref": "#model/definitions/postRef"
}
},
"required": [
"_id",
"createdAt",
"updatedAt",
"authorId",
"content",
"threadId",
"status"
]
}{
"_id": ObjectId("507f1f77bcf86cd799439011"),
"createdAt": ISODate("2016-04-08T15:06:21.595Z"),
"updatedAt": ISODate("2016-04-08T15:06:21.595Z"),
"authorId": ObjectId("507f1f77bcf86cd799439011"),
"content": "Lorem",
"threadId": ObjectId("507f1f77bcf86cd799439011"),
"status": "sent",
"postRef": {
"id": ObjectId("507f1f77bcf86cd799439011"),
"objective": "offer",
"title": "Lorem",
"content": "Lorem",
"author": {
"id": ObjectId("507f1f77bcf86cd799439011"),
"name": "Lorem",
"type": "Lorem",
"location": {
"coordinates": [
35.26,
-32.83
],
"type": "Point",
"country": "Lorem",
"city": "Lorem",
"neighborhood": "Lorem",
"address": "Lorem"
}
}
}
}use applicationDB;
db.createCollection( "messages",{
"storageEngine": {
"wiredTiger": {}
},
"capped": false,
"validator": {
"$jsonSchema": {
"bsonType": "object",
"title": "messages",
"description": "Message sent in a private conversation\n",
"additionalProperties": false,
"properties": {
"_id": {
"bsonType": "objectId",
"description": "ObjectId used as primary key for a message"
},
"createdAt": {
"bsonType": "date",
"description": "Timestamp with message's creation date"
},
"updatedAt": {
"bsonType": "date",
"description": "Timestamp with message's update date"
},
"authorId": {
"bsonType": "objectId",
"description": "ObjectId of the user who sent the message"
},
"content": {
"bsonType": "string",
"description": "Messages content, containing html links and emojis "
},
"threadId": {
"bsonType": "objectId",
"description": "Reference to the thread were the message was sent"
},
"status": {
"bsonType": "string",
"description": "Curerent message status, used to define if it was edited or deleted:\n\n* **sent**: message was sent and not edited or deleted.\n* **edited**: message was edited by the author\n* **deleted**: message was deleted by the author",
"enum": [
"edited",
"deleted",
"sent"
]
},
"postRef": {
"bsonType": "object",
"description": "Optional post reference, allowing a post to be referenced in a message thread.",
"properties": {
"id": {
"bsonType": "objectId"
},
"objective": {
"bsonType": "string",
"description": "Field to indicate the post's objective.\nCurrently only two values allowed: \"offering help\" and \"looking for help\".",
"enum": [
"request",
"offer"
]
},
"title": {
"bsonType": "string",
"description": "The post title."
},
"content": {
"bsonType": "string",
"description": "String for the post content."
},
"author": {
"bsonType": "object",
"properties": {
"id": {
"bsonType": "objectId",
"description": "Foreign key to the user who created the post."
},
"name": {
"bsonType": "string"
},
"type": {
"bsonType": "string"
},
"location": {
"bsonType": "object",
"description": "Location document according to the norms of a [GeoJSON Object](https://docs.mongodb.com/manual/reference/geojson/ ).\nThe fields address, neighborhood, city, state and country are added to store the result of the geoprocessing.",
"properties": {
"coordinates": {
"bsonType": "array",
"description": "Array with the coordinates, specifying **longitude first** and **latitude second**, as default in the [GeoJSON](https://docs.mongodb.com/manual/reference/geojson/) definition.",
"additionalItems": true,
"minItems": 2,
"maxItems": 2,
"uniqueItems": false,
"items": [
{
"bsonType": "number",
"description": "Location longitude\n",
"minimum": -180,
"maximum": 180
},
{
"bsonType": "number",
"description": "Location latitude\n",
"minimum": -90,
"maximum": 90
}
]
},
"type": {
"bsonType": "string",
"description": "Type of the GeoJSON Object.\nPlease refer to the [official documentation](https://docs.mongodb.com/manual/reference/geojson/ ) for more information.\n\n**In our case, the value will always be of the type \"Point\".**",
"enum": [
"Point"
]
},
"country": {
"bsonType": "string",
"description": "String holding the country's name.\n"
},
"city": {
"bsonType": "string",
"description": "String holding the city's name."
},
"neighborhood": {
"bsonType": "string",
"description": "String holding the neighborhood's name."
},
"address": {
"bsonType": "string",
"description": "String holding the address (street, number and other details)."
}
},
"additionalProperties": false,
"required": [
"coordinates",
"type"
]
}
},
"additionalProperties": false,
"required": [
"id",
"name",
"type"
]
}
},
"additionalProperties": false,
"required": [
"id",
"objective",
"title",
"content",
"author"
]
}
},
"required": [
"_id",
"createdAt",
"updatedAt",
"authorId",
"content",
"threadId",
"status"
]
}
},
"validationLevel": "off",
"validationAction": "warn"
});| Property | Value |
| Collection name | notifications |
| Technical name | |
| Id | |
| Description | |
| Database | applicationDB |
| Capped | false |
| Size | |
| Max | |
| Storage engine | WiredTiger |
| Config String | |
| Validation level | Off |
| Validation action | Warn |
| Additional properties | true |
| Comments |
| Field | Type | Req | Key | Description | Comments |
| _id | objectId | true | Automatically generated object_id as primary key. | ||
| createdAt | date | true | Timestamp with the notification's creation date | ||
| updatedAt | date | true | Timestamp with the notification's last update date | ||
| sentAt | date | false | Timestamp of when the notification was sent | ||
| seenAt | date | false | Timestamp with the time the notification was seen by the user | ||
| sender | document | true | Document with the user the info from the user that triggered the notification | ||
| id | objectId | true | Foreign key to the user who created the post. | ||
| name | string | true | Sender user's name | ||
| type | string | true | Sender user's type | ||
| photo | uri | false | Sender user's photo url | ||
| receiver | document | true | Document with the user the info from the user that is receivin the notification | ||
| id | objectId | true | Foreign key to the user who created the post. | ||
| name | string | true | Receiver user's name | ||
| type | string | true | Receiver user's type | ||
| photo | uri | false | Receiver user's photo url | ||
| oneOf | choice | false | OneOf that decides what type of notification is this, with the determinant factor being what it is about (a post, a comment, an organization and etc) | ||
| [0] PostNotification | subschema | false | Notification about a post you created | ||
| postId | objectId | true | |||
| type | string | true | Type of notification | ||
| action | string | true | Type of action that triggered the notification | ||
| [1] CommentNotification | subschema | false | Notification about a comment you created | ||
| commentId | objectId | true | ID of the comment where the notification was triggered | ||
| type | string | true | Type of notification | ||
| action | string | true | Type of action that triggered the notification | ||
| [2] MessageNotification | subschema | false | Notification about private messages | ||
| threadId | objectId | true | ObjectId of the Thread that has new messages | ||
| type | string | true | Type of notification | ||
| action | string | true | Type of action that triggered the notification | ||
| [3] OrganizationNotification | subschema | false | Notification about a organization you manage | ||
| organizationId | objectId | true | ObjectId of the organization the action is about | ||
| type | string | true | Type of notification | ||
| action | string | true | Type of action that triggered the notification |
| Property | Value |
| Name | _id |
| Technical name | |
| Id | |
| Type | objectId |
| Description | Automatically generated object_id as primary key. |
| Dependencies | |
| Required | true |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Sample | |
| Comments |
| Property | Value |
| Name | createdAt |
| Technical name | |
| Id | |
| Type | date |
| Description | Timestamp with the notification's creation date |
| Dependencies | |
| Required | true |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Sample | |
| Comments |
| Property | Value |
| Name | updatedAt |
| Technical name | |
| Id | |
| Type | date |
| Description | Timestamp with the notification's last update date |
| Dependencies | |
| Required | true |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Sample | |
| Comments |
| Property | Value |
| Name | sentAt |
| Technical name | |
| Id | |
| Type | date |
| Description | Timestamp of when the notification was sent |
| Dependencies | |
| Required | false |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Sample | |
| Comments |
| Property | Value |
| Name | seenAt |
| Technical name | |
| Id | |
| Type | date |
| Description | Timestamp with the time the notification was seen by the user |
| Dependencies | |
| Required | false |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Sample | |
| Comments |
| Field | Type | Req | Key | Description | Comments |
| id | objectId | true | fk | Foreign key to the user who created the post. | |
| name | string | true | Sender user's name | ||
| type | string | true | Sender user's type | ||
| photo | string | false | Sender user's photo url |
| Property | Value |
| Name | sender |
| Technical name | |
| Id | |
| Type | document |
| Description | Document with the user the info from the user that triggered the notification |
| Dependencies | |
| Required | true |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| DBRef | |
| Min Properties | |
| Max Properties | |
| Additional properties | false |
| Comments |
| Property | Value |
| Name | name |
| Technical name | |
| Id | |
| Type | string |
| Description | Sender user's name |
| Dependencies | |
| Required | true |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Min length | |
| Max length | |
| Pattern | |
| Format | |
| Enum | |
| Sample | |
| Comments |
| Property | Value |
| Name | type |
| Technical name | |
| Id | |
| Type | string |
| Description | Sender user's type |
| Dependencies | |
| Required | true |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Min length | |
| Max length | |
| Pattern | |
| Format | |
| Enum | |
| Sample | |
| Comments |
| Property | Value |
| Name | photo |
| Technical name | |
| Id | |
| Type | string |
| Description | Sender user's photo url |
| Dependencies | |
| Required | false |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Min length | |
| Max length | |
| Pattern | |
| Format | uri |
| Enum | |
| Sample | |
| Comments |
| Field | Type | Req | Key | Description | Comments |
| id | objectId | true | fk | Foreign key to the user who created the post. | |
| name | string | true | Receiver user's name | ||
| type | string | true | Receiver user's type | ||
| photo | string | false | Receiver user's photo url |
| Property | Value |
| Name | receiver |
| Technical name | |
| Id | |
| Type | document |
| Description | Document with the user the info from the user that is receivin the notification |
| Dependencies | |
| Required | true |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| DBRef | |
| Min Properties | |
| Max Properties | |
| Additional properties | false |
| Comments |
| Property | Value |
| Name | name |
| Technical name | |
| Id | |
| Type | string |
| Description | Receiver user's name |
| Dependencies | |
| Required | true |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Min length | |
| Max length | |
| Pattern | |
| Format | |
| Enum | |
| Sample | |
| Comments |
| Property | Value |
| Name | type |
| Technical name | |
| Id | |
| Type | string |
| Description | Receiver user's type |
| Dependencies | |
| Required | true |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Min length | |
| Max length | |
| Pattern | |
| Format | |
| Enum | |
| Sample | |
| Comments |
| Property | Value |
| Name | photo |
| Technical name | |
| Id | |
| Type | string |
| Description | Receiver user's photo url |
| Dependencies | |
| Required | false |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Min length | |
| Max length | |
| Pattern | |
| Format | uri |
| Enum | |
| Sample | |
| Comments |
| Field | Type | Req | Key | Description | Comments |
| [0] PostNotification | subschema | false | Notification about a post you created | ||
| (1) | subschema | false | Notification about a comment you created | ||
| (2) | subschema | false | Notification about private messages | ||
| [3] OrganizationNotification | subschema | false | Notification about a organization you manage |
| Property | Value |
| Choice | oneOf |
| Description | OneOf that decides what type of notification is this, with the determinant factor being what it is about (a post, a comment, an organization and etc) |
| Comments |
| Field | Type | Req | Key | Description | Comments |
| postId | objectId | true | fk | ||
| type | string | true | Type of notification | ||
| action | string | true | Type of action that triggered the notification |
| Property | Value |
| Display name | PostNotification |
| Id | |
| Description | Notification about a post you created |
| Required | |
| Min Properties | |
| Max Properties | |
| Additional properties | true |
| Comments |
| Property | Value |
| Name | type |
| Technical name | |
| Id | |
| Type | string |
| Description | Type of notification |
| Dependencies | |
| Required | true |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Min length | |
| Max length | |
| Pattern | post |
| Format | |
| Enum | |
| Sample | |
| Comments |
| Property | Value |
| Name | action |
| Technical name | |
| Id | |
| Type | string |
| Description | Type of action that triggered the notification |
| Dependencies | |
| Required | true |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Min length | |
| Max length | |
| Pattern | |
| Format | |
| Enum | comment,like,share |
| Sample | |
| Comments |
| Field | Type | Req | Key | Description | Comments |
| commentId | objectId | true | ID of the comment where the notification was triggered | ||
| type | string | true | Type of notification | ||
| action | string | true | Type of action that triggered the notification |
| Property | Value |
| Display name | CommentNotification |
| Id | |
| Description | Notification about a comment you created |
| Required | |
| Min Properties | |
| Max Properties | |
| Additional properties | false |
| Comments |
| Property | Value |
| Name | commentId |
| Technical name | |
| Id | |
| Type | objectId |
| Description | ID of the comment where the notification was triggered |
| Dependencies | |
| Required | true |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Sample | |
| Comments |
| Property | Value |
| Name | type |
| Technical name | |
| Id | |
| Type | string |
| Description | Type of notification |
| Dependencies | |
| Required | true |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Min length | |
| Max length | |
| Pattern | comment |
| Format | |
| Enum | |
| Sample | |
| Comments |
| Property | Value |
| Name | action |
| Technical name | |
| Id | |
| Type | string |
| Description | Type of action that triggered the notification |
| Dependencies | |
| Required | true |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Min length | |
| Max length | |
| Pattern | |
| Format | |
| Enum | comment,like |
| Sample | |
| Comments |
| Field | Type | Req | Key | Description | Comments |
| threadId | objectId | true | fk | ObjectId of the Thread that has new messages | |
| type | string | true | Type of notification | ||
| action | string | true | Type of action that triggered the notification |
| Property | Value |
| Display name | MessageNotification |
| Id | |
| Description | Notification about private messages |
| Required | |
| Min Properties | |
| Max Properties | |
| Additional properties | false |
| Comments |
| Property | Value |
| Name | type |
| Technical name | |
| Id | |
| Type | string |
| Description | Type of notification |
| Dependencies | |
| Required | true |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Min length | |
| Max length | |
| Pattern | message |
| Format | |
| Enum | |
| Sample | |
| Comments |
| Property | Value |
| Name | action |
| Technical name | |
| Id | |
| Type | string |
| Description | Type of action that triggered the notification |
| Dependencies | |
| Required | true |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Min length | |
| Max length | |
| Pattern | |
| Format | |
| Enum | message |
| Sample | |
| Comments |
| Field | Type | Req | Key | Description | Comments |
| organizationId | objectId | true | fk | ObjectId of the organization the action is about | |
| type | string | true | Type of notification | ||
| action | string | true | Type of action that triggered the notification |
| Property | Value |
| Display name | OrganizationNotification |
| Id | |
| Description | Notification about a organization you manage |
| Required | |
| Min Properties | |
| Max Properties | |
| Additional properties | false |
| Comments |
| Property | Value |
| Name | organizationId |
| Technical name | |
| Id | |
| Type | objectId |
| Description | ObjectId of the organization the action is about |
| Dependencies | |
| Required | true |
| Primary key | false |
| Foreign collection | users |
| Foreign field | _id |
| Relationship type | Foreign Key |
| Default | |
| Sample | |
| Comments |
| Property | Value |
| Name | type |
| Technical name | |
| Id | |
| Type | string |
| Description | Type of notification |
| Dependencies | |
| Required | true |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Min length | |
| Max length | |
| Pattern | organization |
| Format | |
| Enum | |
| Sample | |
| Comments |
| Property | Value |
| Name | action |
| Technical name | |
| Id | |
| Type | string |
| Description | Type of action that triggered the notification |
| Dependencies | |
| Required | true |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Min length | |
| Max length | |
| Pattern | |
| Format | |
| Enum | join |
| Sample | |
| Comments |
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"title": "notifications",
"additionalProperties": true,
"properties": {
"_id": {
"type": "string",
"description": "Automatically generated object_id as primary key.",
"pattern": "^[a-fA-F0-9]{24}$"
},
"createdAt": {
"type": "string",
"description": "Timestamp with the notification's creation date",
"format": "date-time"
},
"updatedAt": {
"type": "string",
"description": "Timestamp with the notification's last update date",
"format": "date-time"
},
"sentAt": {
"type": "string",
"description": "Timestamp of when the notification was sent ",
"format": "date-time"
},
"seenAt": {
"type": "string",
"description": "Timestamp with the time the notification was seen by the user",
"format": "date-time"
},
"sender": {
"type": "object",
"description": "Document with the user the info from the user that triggered the notification",
"properties": {
"id": {
"type": "string",
"description": "Foreign key to the user who created the post.",
"pattern": "^[a-fA-F0-9]{24}$"
},
"name": {
"type": "string",
"description": "Sender user's name"
},
"type": {
"type": "string",
"description": "Sender user's type"
},
"photo": {
"type": "string",
"description": "Sender user's photo url",
"format": "uri"
}
},
"additionalProperties": false,
"required": [
"id",
"name",
"type"
]
},
"receiver": {
"type": "object",
"description": "Document with the user the info from the user that is receivin the notification",
"properties": {
"id": {
"type": "string",
"description": "Foreign key to the user who created the post.",
"pattern": "^[a-fA-F0-9]{24}$"
},
"name": {
"type": "string",
"description": "Receiver user's name\n"
},
"type": {
"type": "string",
"description": "Receiver user's type"
},
"photo": {
"type": "string",
"description": "Receiver user's photo url",
"format": "uri"
}
},
"additionalProperties": false,
"required": [
"id",
"name",
"type"
]
}
},
"oneOf": [
{
"type": "object",
"description": "Notification about a post you created",
"properties": {
"postId": {
"type": "string",
"pattern": "^[a-fA-F0-9]{24}$"
},
"type": {
"type": "string",
"description": "Type of notification",
"pattern": "post"
},
"action": {
"type": "string",
"description": "Type of action that triggered the notification",
"enum": [
"comment",
"like",
"share"
]
}
},
"additionalProperties": true,
"required": [
"postId",
"type",
"action"
]
},
{
"type": "object",
"description": "Notification about a comment you created",
"properties": {
"commentId": {
"type": "string",
"description": "ID of the comment where the notification was triggered",
"pattern": "^[a-fA-F0-9]{24}$"
},
"type": {
"type": "string",
"description": "Type of notification",
"pattern": "comment"
},
"action": {
"type": "string",
"description": "Type of action that triggered the notification",
"enum": [
"comment",
"like"
]
}
},
"additionalProperties": false,
"required": [
"commentId",
"type",
"action"
]
},
{
"type": "object",
"description": "Notification about private messages",
"properties": {
"threadId": {
"type": "string",
"description": "ObjectId of the Thread that has new messages",
"pattern": "^[a-fA-F0-9]{24}$"
},
"type": {
"type": "string",
"description": "Type of notification",
"pattern": "message"
},
"action": {
"type": "string",
"description": "Type of action that triggered the notification",
"enum": [
"message"
]
}
},
"additionalProperties": false,
"required": [
"threadId",
"type",
"action"
]
},
{
"type": "object",
"description": "Notification about a organization you manage",
"properties": {
"organizationId": {
"type": "string",
"description": "ObjectId of the organization the action is about",
"pattern": "^[a-fA-F0-9]{24}$"
},
"type": {
"type": "string",
"description": "Type of notification",
"pattern": "organization"
},
"action": {
"type": "string",
"description": "Type of action that triggered the notification",
"enum": [
"join"
]
}
},
"additionalProperties": false,
"required": [
"organizationId",
"type",
"action"
]
}
],
"required": [
"_id",
"createdAt",
"updatedAt",
"sender",
"receiver"
]
}{
"_id": ObjectId("507f1f77bcf86cd799439011"),
"createdAt": ISODate("2016-04-08T15:06:21.595Z"),
"updatedAt": ISODate("2016-04-08T15:06:21.595Z"),
"sentAt": ISODate("2016-04-08T15:06:21.595Z"),
"seenAt": ISODate("2016-04-08T15:06:21.595Z"),
"sender": {
"id": ObjectId("507f1f77bcf86cd799439011"),
"name": "Lorem",
"type": "Lorem",
"photo": "./resource.txt#frag01"
},
"receiver": {
"id": ObjectId("507f1f77bcf86cd799439011"),
"name": "Lorem",
"type": "Lorem",
"photo": "./resource.txt#frag01"
},
"postId": ObjectId("507f1f77bcf86cd799439011"),
"type": "Lorem",
"action": "share"
}use applicationDB;
db.createCollection( "notifications",{
"storageEngine": {
"wiredTiger": {}
},
"capped": false,
"validator": {
"$jsonSchema": {
"bsonType": "object",
"title": "notifications",
"additionalProperties": true,
"properties": {
"_id": {
"bsonType": "objectId",
"description": "Automatically generated object_id as primary key."
},
"createdAt": {
"bsonType": "date",
"description": "Timestamp with the notification's creation date"
},
"updatedAt": {
"bsonType": "date",
"description": "Timestamp with the notification's last update date"
},
"sentAt": {
"bsonType": "date",
"description": "Timestamp of when the notification was sent "
},
"seenAt": {
"bsonType": "date",
"description": "Timestamp with the time the notification was seen by the user"
},
"sender": {
"bsonType": "object",
"description": "Document with the user the info from the user that triggered the notification",
"properties": {
"id": {
"bsonType": "objectId",
"description": "Foreign key to the user who created the post."
},
"name": {
"bsonType": "string",
"description": "Sender user's name"
},
"type": {
"bsonType": "string",
"description": "Sender user's type"
},
"photo": {
"bsonType": "string",
"description": "Sender user's photo url"
}
},
"additionalProperties": false,
"required": [
"id",
"name",
"type"
]
},
"receiver": {
"bsonType": "object",
"description": "Document with the user the info from the user that is receivin the notification",
"properties": {
"id": {
"bsonType": "objectId",
"description": "Foreign key to the user who created the post."
},
"name": {
"bsonType": "string",
"description": "Receiver user's name\n"
},
"type": {
"bsonType": "string",
"description": "Receiver user's type"
},
"photo": {
"bsonType": "string",
"description": "Receiver user's photo url"
}
},
"additionalProperties": false,
"required": [
"id",
"name",
"type"
]
}
},
"oneOf": [
{
"bsonType": "object",
"description": "Notification about a post you created",
"properties": {
"postId": {
"bsonType": "objectId"
},
"type": {
"bsonType": "string",
"description": "Type of notification",
"pattern": "post"
},
"action": {
"bsonType": "string",
"description": "Type of action that triggered the notification",
"enum": [
"comment",
"like",
"share"
]
}
},
"additionalProperties": true,
"required": [
"postId",
"type",
"action"
]
},
{
"bsonType": "object",
"description": "Notification about a comment you created",
"properties": {
"commentId": {
"bsonType": "objectId",
"description": "ID of the comment where the notification was triggered"
},
"type": {
"bsonType": "string",
"description": "Type of notification",
"pattern": "comment"
},
"action": {
"bsonType": "string",
"description": "Type of action that triggered the notification",
"enum": [
"comment",
"like"
]
}
},
"additionalProperties": false,
"required": [
"commentId",
"type",
"action"
]
},
{
"bsonType": "object",
"description": "Notification about private messages",
"properties": {
"threadId": {
"bsonType": "objectId",
"description": "ObjectId of the Thread that has new messages"
},
"type": {
"bsonType": "string",
"description": "Type of notification",
"pattern": "message"
},
"action": {
"bsonType": "string",
"description": "Type of action that triggered the notification",
"enum": [
"message"
]
}
},
"additionalProperties": false,
"required": [
"threadId",
"type",
"action"
]
},
{
"bsonType": "object",
"description": "Notification about a organization you manage",
"properties": {
"organizationId": {
"bsonType": "objectId",
"description": "ObjectId of the organization the action is about"
},
"type": {
"bsonType": "string",
"description": "Type of notification",
"pattern": "organization"
},
"action": {
"bsonType": "string",
"description": "Type of action that triggered the notification",
"enum": [
"join"
]
}
},
"additionalProperties": false,
"required": [
"organizationId",
"type",
"action"
]
}
],
"required": [
"_id",
"createdAt",
"updatedAt",
"sender",
"receiver"
]
}
},
"validationLevel": "off",
"validationAction": "warn"
});| Property | Value |
| Collection name | posts |
| Technical name | |
| Id | |
| Description | Document to represent a post, asking or offering help to be displayed on the feed |
| Database | applicationDB |
| Capped | false |
| Size | |
| Max | |
| Storage engine | WiredTiger |
| Config String | |
| Validation level | Off |
| Validation action | Warn |
| Additional properties | false |
| Comments |
| Field | Type | Req | Key | Description | Comments |
| _id | objectId | true | |||
| createdAt | date | true | Timestamp with the post's creation date | ||
| updatedAt | date | true | Timestamp with the post's last update date | ||
| expireAt | date | false | Timestamp with the date the post will expire. If no expiration date is present, the post does not expire. | ||
| author | document | true | |||
| id | objectId | true | Foreign key to the user who created the post. | ||
| name | string | true | |||
| type | string | true | |||
| location | document | true | Location document according to the norms of a GeoJSON Object. The fields address, neighborhood, city, state and country are added to store the result of the geoprocessing. | ||
| coordinates | array | true | Array with the coordinates, specifying longitude first and latitude second, as default in the GeoJSON definition. | ||
| [0] | numeric | false | Location longitude | ||
| [1] | numeric | false | Location latitude | ||
| type | string | true | Type of the GeoJSON Object. Please refer to the official documentation for more information. In our case, the value will always be of the type "Point". | ||
| country | string | false | String holding the country's name. | ||
| city | string | false | String holding the city's name. | ||
| neighborhood | string | false | String holding the neighborhood's name. | ||
| address | string | false | String holding the address (street, number and other details). | ||
| title | string | true | The post title. | ||
| content | string | true | String for the post content. | ||
| objective | string | true | Field to indicate the post's objective. Currently only two values allowed: "offering help" and "looking for help". | ||
| visibility | string | true | Field to specify the post's visibility. It can be: worldwide, country, state and zipcode. | ||
| likes | array | true | Array holding the user_id of all the users who liked the post. | ||
| [0] | objectId | false | _id of the user who liked the post | ||
| types | array | false | Array with the post's tags. Can be: Medical Supplies, Groceries/Food, Business, Education, Legal, Wellbeing/Mental, Entertainment, Information, Funding, R&D and Others | ||
| [0] | string | false | |||
| language | array | false | |||
| [0] | string | false | |||
| externalLinks | document | false | |||
| string | false | An email related to the post's content. | |||
| website | string | false | Link for a website related to the post's content. | ||
| playStore | string | false | Link for a Play Store application related to the post's content. | ||
| appStore | string | false | Link for a AppStore application related to the post's content. |
| Property | Value |
| Name | _id |
| Technical name | |
| Id | |
| Type | objectId |
| Description | |
| Dependencies | |
| Required | true |
| Primary key | true |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Sample | |
| Comments |
| Property | Value |
| Name | createdAt |
| Technical name | |
| Id | |
| Type | date |
| Description | Timestamp with the post's creation date |
| Dependencies | |
| Required | true |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Sample | |
| Comments |
| Property | Value |
| Name | updatedAt |
| Technical name | |
| Id | |
| Type | date |
| Description | Timestamp with the post's last update date |
| Dependencies | |
| Required | true |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Sample | |
| Comments |
| Property | Value |
| Name | expireAt |
| Technical name | |
| Id | |
| Type | date |
| Description | Timestamp with the date the post will expire. If no expiration date is present, the post does not expire. |
| Dependencies | |
| Required | false |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Sample | |
| Comments |
| Property | Value |
| Name | author |
| Technical name | |
| $ref | #model/definitions/author |
| Reference type | model |
| Reference description |
| Property | Value |
| Name | title |
| Technical name | |
| Id | |
| Type | string |
| Description | The post title. |
| Dependencies | |
| Required | true |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Min length | |
| Max length | |
| Pattern | |
| Format | |
| Enum | |
| Sample | |
| Comments |
| Property | Value |
| Name | content |
| Technical name | |
| Id | |
| Type | string |
| Description | String for the post content. |
| Dependencies | |
| Required | true |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Min length | |
| Max length | |
| Pattern | |
| Format | |
| Enum | |
| Sample | |
| Comments |
| Property | Value |
| Name | objective |
| Technical name | |
| Id | |
| Type | string |
| Description | Field to indicate the post's objective. Currently only two values allowed: "offering help" and "looking for help". |
| Dependencies | |
| Required | true |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Min length | |
| Max length | |
| Pattern | |
| Format | |
| Enum | request,offer |
| Sample | offer |
| Comments |
| Property | Value |
| Name | visibility |
| Technical name | |
| Id | |
| Type | string |
| Description | Field to specify the post's visibility. It can be: worldwide, country, state and zipcode. |
| Dependencies | |
| Required | true |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Min length | |
| Max length | |
| Pattern | |
| Format | |
| Enum | zipcode,state,country,worldwide |
| Sample | |
| Comments |
| Field | Type | Req | Key | Description | Comments |
| [0] | objectId | false | fk | _id of the user who liked the post |
| Property | Value |
| Name | likes |
| Technical name | |
| Id | |
| Type | array |
| Description | Array holding the user_id of all the users who liked the post. |
| Dependencies | |
| Required | true |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Min items | |
| Max items | |
| Unique items | true |
| Additional items | true |
| Comments |
| Field | Type | Req | Key | Description | Comments |
| [0] | string | false |
| Property | Value |
| Name | types |
| Technical name | |
| Id | |
| Type | array |
| Description | Array with the post's tags. Can be: Medical Supplies, Groceries/Food, Business, Education, Legal, Wellbeing/Mental, Entertainment, Information, Funding, R&D and Others |
| Dependencies | |
| Required | false |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Min items | |
| Max items | |
| Unique items | false |
| Additional items | true |
| Comments |
| Property | Value |
| Display name | |
| Id | |
| Type | string |
| Description | |
| Dependencies | |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Min length | |
| Max length | |
| Pattern | |
| Format | |
| Enum | Medical Supplies,Groceries/Food,Business,Education,Legal,Wellbeing/Mental,Entertainment,Information,Funding,R&D,Others |
| Sample | Groceries/Food |
| Comments |
| Field | Type | Req | Key | Description | Comments |
| [0] | string | false |
| Property | Value |
| Name | language |
| Technical name | |
| Id | |
| Type | array |
| Description | |
| Dependencies | |
| Required | false |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Min items | |
| Max items | |
| Unique items | false |
| Additional items | true |
| Comments |
| Property | Value |
| Display name | |
| Id | |
| Type | string |
| Description | |
| Dependencies | |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Min length | |
| Max length | |
| Pattern | |
| Format | |
| Enum | |
| Sample | |
| Comments |
| Field | Type | Req | Key | Description | Comments |
| string | false | An email related to the post's content. | |||
| website | string | false | Link for a website related to the post's content. | ||
| playStore | string | false | Link for a Play Store application related to the post's content. | ||
| appStore | string | false | Link for a AppStore application related to the post's content. |
| Property | Value |
| Name | externalLinks |
| Technical name | |
| Id | |
| Type | document |
| Description | |
| Dependencies | |
| Required | false |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| DBRef | |
| Min Properties | |
| Max Properties | |
| Additional properties | false |
| Comments |
| Property | Value |
| Name | |
| Technical name | |
| Id | |
| Type | string |
| Description | An email related to the post's content. |
| Dependencies | |
| Required | false |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Min length | |
| Max length | |
| Pattern | |
| Format | |
| Enum | |
| Sample | |
| Comments |
| Property | Value |
| Name | website |
| Technical name | |
| Id | |
| Type | string |
| Description | Link for a website related to the post's content. |
| Dependencies | |
| Required | false |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Min length | |
| Max length | |
| Pattern | |
| Format | |
| Enum | |
| Sample | |
| Comments |
| Property | Value |
| Name | playStore |
| Technical name | |
| Id | |
| Type | string |
| Description | Link for a Play Store application related to the post's content. |
| Dependencies | |
| Required | false |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Min length | |
| Max length | |
| Pattern | |
| Format | |
| Enum | |
| Sample | |
| Comments |
| Property | Value |
| Name | appStore |
| Technical name | |
| Id | |
| Type | string |
| Description | Link for a AppStore application related to the post's content. |
| Dependencies | |
| Required | false |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Min length | |
| Max length | |
| Pattern | |
| Format | |
| Enum | |
| Sample | |
| Comments |
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"title": "posts",
"description": "Document to represent a post, asking or offering help to be displayed on the feed",
"additionalProperties": false,
"properties": {
"_id": {
"type": "string",
"pattern": "^[a-fA-F0-9]{24}$"
},
"createdAt": {
"type": "string",
"description": "Timestamp with the post's creation date",
"format": "date-time"
},
"updatedAt": {
"type": "string",
"description": "Timestamp with the post's last update date",
"format": "date-time"
},
"expireAt": {
"type": "string",
"description": "Timestamp with the date the post will expire.\nIf no expiration date is present, the post does not expire.",
"format": "date-time"
},
"author": {
"$ref": "#model/definitions/author"
},
"title": {
"type": "string",
"description": "The post title."
},
"content": {
"type": "string",
"description": "String for the post content."
},
"objective": {
"type": "string",
"description": "Field to indicate the post's objective.\nCurrently only two values allowed: \"offering help\" and \"looking for help\".",
"enum": [
"request",
"offer"
]
},
"visibility": {
"type": "string",
"description": "Field to specify the post's visibility. It can be: worldwide, country, state and zipcode.",
"enum": [
"zipcode",
"state",
"country",
"worldwide"
]
},
"likes": {
"type": "array",
"description": "Array holding the user_id of all the users who liked the post.",
"additionalItems": true,
"uniqueItems": true,
"items": {
"type": "string",
"description": "_id of the user who liked the post",
"pattern": "^[a-fA-F0-9]{24}$"
}
},
"types": {
"type": "array",
"description": "Array with the post's tags.\nCan be: Medical Supplies, Groceries/Food, Business, Education, Legal, Wellbeing/Mental, Entertainment, Information, Funding, R&D and Others",
"additionalItems": true,
"uniqueItems": false,
"items": {
"type": "string",
"enum": [
"Medical Supplies",
"Groceries/Food",
"Business",
"Education",
"Legal",
"Wellbeing/Mental",
"Entertainment",
"Information",
"Funding",
"R&D",
"Others"
]
}
},
"language": {
"type": "array",
"additionalItems": true,
"uniqueItems": false,
"items": {
"type": "string"
}
},
"externalLinks": {
"type": "object",
"properties": {
"email": {
"type": "string",
"description": "An email related to the post's content."
},
"website": {
"type": "string",
"description": "Link for a website related to the post's content."
},
"playStore": {
"type": "string",
"description": "Link for a Play Store application related to the post's content."
},
"appStore": {
"type": "string",
"description": "Link for a AppStore application related to the post's content."
}
},
"additionalProperties": false
}
},
"required": [
"_id",
"createdAt",
"updatedAt",
"author",
"title",
"content",
"objective",
"visibility",
"likes"
]
}{
"_id": ObjectId("507f1f77bcf86cd799439011"),
"createdAt": ISODate("2016-04-08T15:06:21.595Z"),
"updatedAt": ISODate("2016-04-08T15:06:21.595Z"),
"expireAt": ISODate("2016-04-08T15:06:21.595Z"),
"author": {
"id": ObjectId("507f1f77bcf86cd799439011"),
"name": "Lorem",
"type": "Lorem",
"location": {
"coordinates": [
35.26,
-32.83
],
"type": "Point",
"country": "Lorem",
"city": "Lorem",
"neighborhood": "Lorem",
"address": "Lorem"
}
},
"title": "Lorem",
"content": "Lorem",
"objective": "offer",
"visibility": "worldwide",
"likes": [
ObjectId("507f1f77bcf86cd799439011")
],
"types": [
"Groceries/Food"
],
"language": [
"Lorem"
],
"externalLinks": {
"email": "Lorem",
"website": "Lorem",
"playStore": "Lorem",
"appStore": "Lorem"
}
}use applicationDB;
db.createCollection( "posts",{
"storageEngine": {
"wiredTiger": {}
},
"capped": false,
"validator": {
"$jsonSchema": {
"bsonType": "object",
"title": "posts",
"description": "Document to represent a post, asking or offering help to be displayed on the feed",
"additionalProperties": false,
"properties": {
"_id": {
"bsonType": "objectId"
},
"createdAt": {
"bsonType": "date",
"description": "Timestamp with the post's creation date"
},
"updatedAt": {
"bsonType": "date",
"description": "Timestamp with the post's last update date"
},
"expireAt": {
"bsonType": "date",
"description": "Timestamp with the date the post will expire.\nIf no expiration date is present, the post does not expire."
},
"author": {
"bsonType": "object",
"properties": {
"id": {
"bsonType": "objectId",
"description": "Foreign key to the user who created the post."
},
"name": {
"bsonType": "string"
},
"type": {
"bsonType": "string"
},
"location": {
"bsonType": "object",
"description": "Location document according to the norms of a [GeoJSON Object](https://docs.mongodb.com/manual/reference/geojson/ ).\nThe fields address, neighborhood, city, state and country are added to store the result of the geoprocessing.",
"properties": {
"coordinates": {
"bsonType": "array",
"description": "Array with the coordinates, specifying **longitude first** and **latitude second**, as default in the [GeoJSON](https://docs.mongodb.com/manual/reference/geojson/) definition.",
"additionalItems": true,
"minItems": 2,
"maxItems": 2,
"uniqueItems": false,
"items": [
{
"bsonType": "number",
"description": "Location longitude\n",
"minimum": -180,
"maximum": 180
},
{
"bsonType": "number",
"description": "Location latitude\n",
"minimum": -90,
"maximum": 90
}
]
},
"type": {
"bsonType": "string",
"description": "Type of the GeoJSON Object.\nPlease refer to the [official documentation](https://docs.mongodb.com/manual/reference/geojson/ ) for more information.\n\n**In our case, the value will always be of the type \"Point\".**",
"enum": [
"Point"
]
},
"country": {
"bsonType": "string",
"description": "String holding the country's name.\n"
},
"city": {
"bsonType": "string",
"description": "String holding the city's name."
},
"neighborhood": {
"bsonType": "string",
"description": "String holding the neighborhood's name."
},
"address": {
"bsonType": "string",
"description": "String holding the address (street, number and other details)."
}
},
"additionalProperties": false,
"required": [
"coordinates",
"type"
]
}
},
"additionalProperties": false,
"required": [
"id",
"name",
"type"
]
},
"title": {
"bsonType": "string",
"description": "The post title."
},
"content": {
"bsonType": "string",
"description": "String for the post content."
},
"objective": {
"bsonType": "string",
"description": "Field to indicate the post's objective.\nCurrently only two values allowed: \"offering help\" and \"looking for help\".",
"enum": [
"request",
"offer"
]
},
"visibility": {
"bsonType": "string",
"description": "Field to specify the post's visibility. It can be: worldwide, country, state and zipcode.",
"enum": [
"zipcode",
"state",
"country",
"worldwide"
]
},
"likes": {
"bsonType": "array",
"description": "Array holding the user_id of all the users who liked the post.",
"additionalItems": true,
"uniqueItems": true,
"items": {
"bsonType": "objectId",
"description": "_id of the user who liked the post"
}
},
"types": {
"bsonType": "array",
"description": "Array with the post's tags.\nCan be: Medical Supplies, Groceries/Food, Business, Education, Legal, Wellbeing/Mental, Entertainment, Information, Funding, R&D and Others",
"additionalItems": true,
"uniqueItems": false,
"items": {
"bsonType": "string",
"enum": [
"Medical Supplies",
"Groceries/Food",
"Business",
"Education",
"Legal",
"Wellbeing/Mental",
"Entertainment",
"Information",
"Funding",
"R&D",
"Others"
]
}
},
"language": {
"bsonType": "array",
"additionalItems": true,
"uniqueItems": false,
"items": {
"bsonType": "string"
}
},
"externalLinks": {
"bsonType": "object",
"properties": {
"email": {
"bsonType": "string",
"description": "An email related to the post's content."
},
"website": {
"bsonType": "string",
"description": "Link for a website related to the post's content."
},
"playStore": {
"bsonType": "string",
"description": "Link for a Play Store application related to the post's content."
},
"appStore": {
"bsonType": "string",
"description": "Link for a AppStore application related to the post's content."
}
},
"additionalProperties": false
}
},
"required": [
"_id",
"createdAt",
"updatedAt",
"author",
"title",
"content",
"objective",
"visibility",
"likes"
]
}
},
"validationLevel": "off",
"validationAction": "warn"
});| Property | Value |
| Collection name | thread |
| Technical name | |
| Id | |
| Description | ObjectId that serves as primary key for the message thread. |
| Database | applicationDB |
| Capped | false |
| Size | |
| Max | |
| Storage engine | WiredTiger |
| Config String | |
| Validation level | Off |
| Validation action | Warn |
| Additional properties | false |
| Comments |
| Field | Type | Req | Key | Description | Comments |
| _id | objectId | true | |||
| createdAt | date | true | Timestamp with the threads's creation date | ||
| updatedAt | date | true | Timestamp with the thread's update date | ||
| status | string | true | Curerent thread status, used to define archives, soft deletes and other conversation status. The statuses are:
| ||
| participants | array | true | Array of user reference's, containing the participants of the message thread. It is modelled as an array to allow expansion to group chats in the future. | ||
| [0] | document | true | |||
| id | objectId | true | Foreign key to the user who created the post. | ||
| name | string | true | User's name | ||
| type | string | true | User's type | ||
| newMessages | boolean | true | Flag to indicate whether there are new messages since last time the user accessed the thread. | ||
| lastAccess | date | true | Timestamp with the last time the user accessed the message thread. | ||
| photo | uri | false | URL with the user photo |
| Property | Value |
| Name | _id |
| Technical name | |
| Id | |
| Type | objectId |
| Description | |
| Dependencies | |
| Required | true |
| Primary key | true |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Sample | |
| Comments |
| Property | Value |
| Name | createdAt |
| Technical name | |
| Id | |
| Type | date |
| Description | Timestamp with the threads's creation date |
| Dependencies | |
| Required | true |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Sample | |
| Comments |
| Property | Value |
| Name | updatedAt |
| Technical name | |
| Id | |
| Type | date |
| Description | Timestamp with the thread's update date |
| Dependencies | |
| Required | true |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Sample | |
| Comments |
| Property | Value |
| Name | status |
| Technical name | |
| Id | |
| Type | string |
| Description | Curerent thread status, used to define archives, soft deletes and other conversation status. The statuses are:
|
| Dependencies | |
| Required | true |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | pending |
| Min length | |
| Max length | |
| Pattern | |
| Format | |
| Enum | blocked,accepted,pending,archived |
| Sample | |
| Comments |
| Field | Type | Req | Key | Description | Comments |
| [0] | document | true |
| Property | Value |
| Name | participants |
| Technical name | |
| Id | |
| Type | array |
| Description | Array of user reference's, containing the participants of the message thread. It is modelled as an array to allow expansion to group chats in the future. |
| Dependencies | |
| Required | true |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Min items | 2 |
| Max items | |
| Unique items | false |
| Additional items | true |
| Comments |
| Field | Type | Req | Key | Description | Comments |
| id | objectId | true | fk | Foreign key to the user who created the post. | |
| name | string | true | User's name | ||
| type | string | true | User's type | ||
| newMessages | boolean | true | Flag to indicate whether there are new messages since last time the user accessed the thread. | ||
| lastAccess | date | true | Timestamp with the last time the user accessed the message thread. | ||
| photo | string | false | URL with the user photo |
| Property | Value |
| Id | |
| Type | document |
| Description | |
| Dependencies | |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| DBRef | |
| Min Properties | |
| Max Properties | |
| Additional properties | false |
| Comments |
| Property | Value |
| Name | name |
| Technical name | |
| Id | |
| Type | string |
| Description | User's name |
| Dependencies | |
| Required | true |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Min length | |
| Max length | |
| Pattern | |
| Format | |
| Enum | |
| Sample | |
| Comments |
| Property | Value |
| Name | type |
| Technical name | |
| Id | |
| Type | string |
| Description | User's type |
| Dependencies | |
| Required | true |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Min length | |
| Max length | |
| Pattern | |
| Format | |
| Enum | |
| Sample | |
| Comments |
| Property | Value |
| Name | newMessages |
| Technical name | |
| Id | |
| Type | boolean |
| Description | Flag to indicate whether there are new messages since last time the user accessed the thread. |
| Dependencies | |
| Required | true |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | false |
| Sample | |
| Comments |
| Property | Value |
| Name | lastAccess |
| Technical name | |
| Id | |
| Type | date |
| Description | Timestamp with the last time the user accessed the message thread. |
| Dependencies | |
| Required | true |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Sample | |
| Comments |
| Property | Value |
| Name | photo |
| Technical name | |
| Id | |
| Type | string |
| Description | URL with the user photo |
| Dependencies | |
| Required | false |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Min length | |
| Max length | |
| Pattern | |
| Format | uri |
| Enum | |
| Sample | |
| Comments |
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"title": "thread",
"description": "ObjectId that serves as primary key for the message thread.",
"additionalProperties": false,
"properties": {
"_id": {
"type": "string",
"pattern": "^[a-fA-F0-9]{24}$"
},
"createdAt": {
"type": "string",
"description": "Timestamp with the threads's creation date",
"format": "date-time"
},
"updatedAt": {
"type": "string",
"description": "Timestamp with the thread's update date",
"format": "date-time"
},
"status": {
"type": "string",
"description": "Curerent thread status, used to define archives, soft deletes and other conversation status. The statuses are:\n\n* **pending**: if the user didn't accept the message request yet\n* **blocked**: if the one of the user's blocked the other\n* **accepted**: message request was accepted and users exchange messages\n* **archived**: user archived the message thread\n",
"default": "pending",
"enum": [
"blocked",
"accepted",
"pending",
"archived"
]
},
"participants": {
"type": "array",
"description": "Array of user reference's, containing the participants of the message thread.\n\nIt is modelled as an array to allow expansion to group chats in the future.",
"additionalItems": true,
"minItems": 2,
"uniqueItems": false,
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Foreign key to the user who created the post.",
"pattern": "^[a-fA-F0-9]{24}$"
},
"name": {
"type": "string",
"description": "User's name"
},
"type": {
"type": "string",
"description": "User's type"
},
"newMessages": {
"type": "boolean",
"description": "Flag to indicate whether there are new messages since last time the user accessed the thread.",
"default": false
},
"lastAccess": {
"type": "string",
"description": "Timestamp with the last time the user accessed the message thread.",
"format": "date-time"
},
"photo": {
"type": "string",
"description": "URL with the user photo",
"format": "uri"
}
},
"additionalProperties": false,
"required": [
"id",
"name",
"type",
"newMessages",
"lastAccess"
]
}
}
},
"required": [
"_id",
"createdAt",
"updatedAt",
"status",
"participants"
]
}{
"_id": ObjectId("507f1f77bcf86cd799439011"),
"createdAt": ISODate("2016-04-08T15:06:21.595Z"),
"updatedAt": ISODate("2016-04-08T15:06:21.595Z"),
"status": "pending",
"participants": [
{
"id": ObjectId("507f1f77bcf86cd799439011"),
"name": "Lorem",
"type": "Lorem",
"newMessages": false,
"lastAccess": ISODate("2016-04-08T15:06:21.595Z"),
"photo": "./resource.txt#frag01"
}
]
}use applicationDB;
db.createCollection( "thread",{
"storageEngine": {
"wiredTiger": {}
},
"capped": false,
"validator": {
"$jsonSchema": {
"bsonType": "object",
"title": "thread",
"description": "ObjectId that serves as primary key for the message thread.",
"additionalProperties": false,
"properties": {
"_id": {
"bsonType": "objectId"
},
"createdAt": {
"bsonType": "date",
"description": "Timestamp with the threads's creation date"
},
"updatedAt": {
"bsonType": "date",
"description": "Timestamp with the thread's update date"
},
"status": {
"bsonType": "string",
"description": "Curerent thread status, used to define archives, soft deletes and other conversation status. The statuses are:\n\n* **pending**: if the user didn't accept the message request yet\n* **blocked**: if the one of the user's blocked the other\n* **accepted**: message request was accepted and users exchange messages\n* **archived**: user archived the message thread\n",
"enum": [
"blocked",
"accepted",
"pending",
"archived"
]
},
"participants": {
"bsonType": "array",
"description": "Array of user reference's, containing the participants of the message thread.\n\nIt is modelled as an array to allow expansion to group chats in the future.",
"additionalItems": true,
"minItems": 2,
"uniqueItems": false,
"items": {
"bsonType": "object",
"properties": {
"id": {
"bsonType": "objectId",
"description": "Foreign key to the user who created the post."
},
"name": {
"bsonType": "string",
"description": "User's name"
},
"type": {
"bsonType": "string",
"description": "User's type"
},
"newMessages": {
"bsonType": "bool",
"description": "Flag to indicate whether there are new messages since last time the user accessed the thread."
},
"lastAccess": {
"bsonType": "date",
"description": "Timestamp with the last time the user accessed the message thread."
},
"photo": {
"bsonType": "string",
"description": "URL with the user photo"
}
},
"additionalProperties": false,
"required": [
"id",
"name",
"type",
"newMessages",
"lastAccess"
]
}
}
},
"required": [
"_id",
"createdAt",
"updatedAt",
"status",
"participants"
]
}
},
"validationLevel": "off",
"validationAction": "warn"
});| Property | Value |
| Collection name | users |
| Technical name | |
| Id | |
| Description | Collection that holds all the data on system's users. The users can be of two types: (1) Individual, representing a private user account; and (2) Organization, representing an organization of various types. The field 'type' is used to differentiate between the two subschemas, with 'individual' representing private user accounts and "Community", "Government", "Health care provider", "Non-profit", "Other", "R&D", "Startup", "Traditional Company" and "University". |
| Database | applicationDB |
| Capped | false |
| Size | |
| Max | |
| Storage engine | WiredTiger |
| Config String | |
| Validation level | Off |
| Validation action | Warn |
| Additional properties | true |
| Comments |
| Field | Type | Req | Key | Description | Comments |
| _id | objectId | true | Automatically generated _it as primary key. | ||
| createdAt | date | true | Timestamp with the user's creation date | Thu Apr 16 2020 04:59:24 GMT-0300 (Horário Padrão de BrasÃlia): changed the name to registeredAt | |
| updatedAt | date | true | Timestamp indicating last update on the database. | ||
| authId | string | true | String holding the authentication service id (Auth0). This field is a foreign key to the user in the Auth0 database, connecting through the user_id field. | ||
| location | document | false | Location document according to the norms of a GeoJSON Object. The fields address, neighborhood, city, state and country are added to store the result of the geoprocessing. | ||
| coordinates | array | true | Array with the coordinates, specifying longitude first and latitude second, as default in the GeoJSON definition. | ||
| [0] | numeric | false | Location longitude | ||
| [1] | numeric | false | Location latitude | ||
| type | string | true | Type of the GeoJSON Object. Please refer to the official documentation for more information. In our case, the value will always be of the type "Point". | ||
| country | string | false | String holding the country's name. | ||
| city | string | false | String holding the city's name. | ||
| neighborhood | string | false | String holding the neighborhood's name. | ||
| address | string | false | String holding the address (street, number and other details). | ||
| about | string | false | Small self-introduction, limited to 100 char | ||
| photo | uri | false | URI with the location of the profile's photo. | ||
| oneOf | choice | false | |||
| [0] subschema | subschema | false | Subschema representing a individual account. | ||
| type | string | true | |||
| firstName | string | true | The first name of the user | ||
| lastName | string | false | The last name of the user. Optional field. | ||
| needs | document | true | User's need in the app, representing what kind of help he/she needs | ||
| medicalHelp | boolean | true | Flag to indicate wheter the user needs medical help. Marking this indicates he shows symptoms of COVID-19. | ||
| otherHelp | boolean | true | Flag to indicate wheter the user needs non-medical help, such as getting groceries, medice and etc.. | ||
| objectives | document | false | Document with what are the objectives of the user through the application, such as donating, volunteering or sharing information. | ||
| volunteer | boolean | true | Flag to indicate wheter the user wants to volunteer for iniciatives through the app. | ||
| donate | boolean | true | Flag to indicate wheter the user wants to donate for iniciatives through the app. | ||
| shareInformation | boolean | true | Flag to indicate wheter the user wants to share information through the app. | ||
| urls | document | false | Document holding the user urls to external websites and social networks | ||
| uri | false | URL to user's Facebook page. | |||
| uri | false | URL to user's Linkedin page. | |||
| uri | false | URL to user's Twitter page. | |||
| github | uri | false | URL to user's Github page. | ||
| website | uri | false | URL to user's personal website. | ||
| [1] subschema | subschema | false | Subschema representing an organization (colective) account. | ||
| type | string | true | The type of the organization. Can be: Community, Government, Health care provider, Non-profit, Other, R&D, Startup, Traditional Company and University. All names are store in lowercase only. | ||
| industry | string | true | Industry from which the organization participates. Plan is for this values to be scraped from linkedin industries. | ||
| ownerId | objectId | true | _id of the user who owns the organization. | ||
| name | string | true | Organization's name. | ||
| needs | document | true | Document with what are the objectives of the organization through the application, such as finding volunteers, staff, investors and donors. | ||
| volunteers | boolean | true | Flag to indicate wheter the organization is seeking volunteers through the app. | ||
| donations | boolean | true | Flag to indicate wheter the organization is seeking donations through the app. | ||
| staff | boolean | true | Flag to indicate wheter the organization is seeking staff through the app. | ||
| other | boolean | true | Flag to indicate wheter the organization is seeking other needs through the app. | ||
| global | boolean | false | Flag to indicate wheter this organization is global. | ||
| urls | document | false | Document holding external urls and refs to the organization such as social media profiles. | ||
| uri | false | URL to organization's Linkedin page. | |||
| uri | false | URL to organization's Twitter page. | |||
| website | uri | false | URL to organization's website. | ||
| playstore | uri | false | URL to organization's page at Google Play Store. | ||
| appstore | uri | false | URL to organization's page at Apple App Store | ||
| language | string | false | Field to inidicate the language used by the organization. | ||
| anyOf | choice | false | |||
| [0] subschema | subschema | false | Case where the user comes from social networks with a registration that uses email. In this case, the email field is required. This case covers the great majority of currently supported social network authentications. | ||
| true | User's email validated by a regex pattern. | ||||
| [1] subschema | subschema | false | Case where the user comes from social networks with a registration that allows the use of only the phone. In this case, the phone field is required, and the email isn't. An example of ocial network that falls into this case is Twitter. | ||
| phone | string | true |
| Property | Value |
| Name | createdAt |
| Technical name | |
| Id | |
| Type | date |
| Description | Timestamp with the user's creation date |
| Dependencies | |
| Required | true |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Sample | |
| Comments | Thu Apr 16 2020 04:59:24 GMT-0300 (Horário Padrão de BrasÃlia): changed the name to registeredAt |
| Property | Value |
| Name | _id |
| Technical name | |
| Id | |
| Type | objectId |
| Description | Automatically generated _it as primary key. |
| Dependencies | |
| Required | true |
| Primary key | true |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Sample | |
| Comments |
| Property | Value |
| Name | updatedAt |
| Technical name | |
| Id | |
| Type | date |
| Description | Timestamp indicating last update on the database. |
| Dependencies | |
| Required | true |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Sample | |
| Comments |
| Property | Value |
| Name | authId |
| Technical name | |
| Id | |
| Type | string |
| Description | String holding the authentication service id (Auth0). This field is a foreign key to the user in the Auth0 database, connecting through the user_id field. |
| Dependencies | |
| Required | true |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Min length | |
| Max length | |
| Pattern | |
| Format | |
| Enum | |
| Sample | |
| Comments |
| Property | Value |
| Name | location |
| Technical name | |
| $ref | #model/definitions/location |
| Reference type | model |
| Reference description |
| Property | Value |
| Name | about |
| Technical name | |
| Id | |
| Type | string |
| Description | Small self-introduction, limited to 100 char |
| Dependencies | |
| Required | false |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Min length | |
| Max length | |
| Pattern | |
| Format | |
| Enum | |
| Sample | |
| Comments |
| Property | Value |
| Name | photo |
| Technical name | |
| Id | |
| Type | string |
| Description | URI with the location of the profile's photo. |
| Dependencies | |
| Required | false |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Min length | |
| Max length | |
| Pattern | |
| Format | uri |
| Enum | |
| Sample | |
| Comments |
| Field | Type | Req | Key | Description | Comments |
| subschema | subschema | false | Subschema representing a individual account. | ||
| subschema | subschema | false | Subschema representing an organization (colective) account. |
| Property | Value |
| Choice | oneOf |
| Description | |
| Comments |
| Field | Type | Req | Key | Description | Comments |
| type | string | true | |||
| firstName | string | true | The first name of the user | ||
| lastName | string | false | The last name of the user. Optional field. | ||
| needs | document | true | User's need in the app, representing what kind of help he/she needs | ||
| objectives | document | false | Document with what are the objectives of the user through the application, such as donating, volunteering or sharing information. | ||
| urls | document | false | Document holding the user urls to external websites and social networks |
| Property | Value |
| Display name | subschema |
| Id | individual |
| Description | Subschema representing a individual account. |
| Required | |
| Min Properties | |
| Max Properties | |
| Additional properties | true |
| Comments |
| Property | Value |
| Name | type |
| Technical name | |
| Id | |
| Type | string |
| Description | |
| Dependencies | |
| Required | true |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Min length | |
| Max length | |
| Pattern | |
| Format | |
| Enum | individual |
| Sample | |
| Comments |
| Property | Value |
| Name | firstName |
| Technical name | |
| Id | |
| Type | string |
| Description | The first name of the user |
| Dependencies | |
| Required | true |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Min length | |
| Max length | |
| Pattern | |
| Format | |
| Enum | |
| Sample | |
| Comments |
| Property | Value |
| Name | lastName |
| Technical name | |
| Id | |
| Type | string |
| Description | The last name of the user. Optional field. |
| Dependencies | |
| Required | false |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Min length | |
| Max length | |
| Pattern | |
| Format | |
| Enum | |
| Sample | |
| Comments |
| Field | Type | Req | Key | Description | Comments |
| medicalHelp | boolean | true | Flag to indicate wheter the user needs medical help. Marking this indicates he shows symptoms of COVID-19. | ||
| otherHelp | boolean | true | Flag to indicate wheter the user needs non-medical help, such as getting groceries, medice and etc.. |
| Property | Value |
| Name | needs |
| Technical name | |
| Id | |
| Type | document |
| Description | User's need in the app, representing what kind of help he/she needs |
| Dependencies | |
| Required | true |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| DBRef | |
| Min Properties | |
| Max Properties | |
| Additional properties | false |
| Comments |
| Property | Value |
| Name | medicalHelp |
| Technical name | |
| Id | |
| Type | boolean |
| Description | Flag to indicate wheter the user needs medical help. Marking this indicates he shows symptoms of COVID-19. |
| Dependencies | |
| Required | true |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | false |
| Sample | false |
| Comments |
| Property | Value |
| Name | otherHelp |
| Technical name | |
| Id | |
| Type | boolean |
| Description | Flag to indicate wheter the user needs non-medical help, such as getting groceries, medice and etc.. |
| Dependencies | |
| Required | true |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | false |
| Sample | false |
| Comments |
| Field | Type | Req | Key | Description | Comments |
| volunteer | boolean | true | Flag to indicate wheter the user wants to volunteer for iniciatives through the app. | ||
| donate | boolean | true | Flag to indicate wheter the user wants to donate for iniciatives through the app. | ||
| shareInformation | boolean | true | Flag to indicate wheter the user wants to share information through the app. |
| Property | Value |
| Name | objectives |
| Technical name | |
| Id | |
| Type | document |
| Description | Document with what are the objectives of the user through the application, such as donating, volunteering or sharing information. |
| Dependencies | |
| Required | false |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| DBRef | |
| Min Properties | |
| Max Properties | |
| Additional properties | false |
| Comments |
| Property | Value |
| Name | volunteer |
| Technical name | |
| Id | |
| Type | boolean |
| Description | Flag to indicate wheter the user wants to volunteer for iniciatives through the app. |
| Dependencies | |
| Required | true |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | false |
| Sample | false |
| Comments |
| Property | Value |
| Name | donate |
| Technical name | |
| Id | |
| Type | boolean |
| Description | Flag to indicate wheter the user wants to donate for iniciatives through the app. |
| Dependencies | |
| Required | true |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | false |
| Sample | false |
| Comments |
| Property | Value |
| Name | shareInformation |
| Technical name | |
| Id | |
| Type | boolean |
| Description | Flag to indicate wheter the user wants to share information through the app. |
| Dependencies | |
| Required | true |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | true |
| Sample | true |
| Comments |
| Field | Type | Req | Key | Description | Comments |
| string | false | URL to user's Facebook page. | |||
| string | false | URL to user's Linkedin page. | |||
| string | false | URL to user's Twitter page. | |||
| github | string | false | URL to user's Github page. | ||
| website | string | false | URL to user's personal website. |
| Property | Value |
| Name | urls |
| Technical name | |
| Id | |
| Type | document |
| Description | Document holding the user urls to external websites and social networks |
| Dependencies | |
| Required | false |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| DBRef | |
| Min Properties | |
| Max Properties | |
| Additional properties | false |
| Comments |
| Property | Value |
| Name | |
| Technical name | |
| Id | |
| Type | string |
| Description | URL to user's Facebook page. |
| Dependencies | |
| Required | false |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Min length | |
| Max length | |
| Pattern | |
| Format | uri |
| Enum | |
| Sample | http://facebook.com/myProfile |
| Comments |
| Property | Value |
| Name | |
| Technical name | |
| Id | |
| Type | string |
| Description | URL to user's Linkedin page. |
| Dependencies | |
| Required | false |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Min length | |
| Max length | |
| Pattern | |
| Format | uri |
| Enum | |
| Sample | http://linkedin.com/in/myProfile |
| Comments |
| Property | Value |
| Name | |
| Technical name | |
| Id | |
| Type | string |
| Description | URL to user's Twitter page. |
| Dependencies | |
| Required | false |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Min length | |
| Max length | |
| Pattern | |
| Format | uri |
| Enum | |
| Sample | http://twitter.com/myProfile |
| Comments |
| Property | Value |
| Name | github |
| Technical name | |
| Id | |
| Type | string |
| Description | URL to user's Github page. |
| Dependencies | |
| Required | false |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Min length | |
| Max length | |
| Pattern | |
| Format | uri |
| Enum | |
| Sample | http://github.com/myProfile |
| Comments |
| Property | Value |
| Name | website |
| Technical name | |
| Id | |
| Type | string |
| Description | URL to user's personal website. |
| Dependencies | |
| Required | false |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Min length | |
| Max length | |
| Pattern | |
| Format | uri |
| Enum | |
| Sample | http://mypersonalwebsite.com |
| Comments |
| Field | Type | Req | Key | Description | Comments |
| type | string | true | The type of the organization. Can be: Community, Government, Health care provider, Non-profit, Other, R&D, Startup, Traditional Company and University. All names are store in lowercase only. | ||
| industry | string | true | Industry from which the organization participates. Plan is for this values to be scraped from linkedin industries. | ||
| ownerId | objectId | true | fk | _id of the user who owns the organization. | |
| name | string | true | Organization's name. | ||
| needs | document | true | Document with what are the objectives of the organization through the application, such as finding volunteers, staff, investors and donors. | ||
| global | boolean | false | Flag to indicate wheter this organization is global. | ||
| urls | document | false | Document holding external urls and refs to the organization such as social media profiles. | ||
| language | string | false | Field to inidicate the language used by the organization. |
| Property | Value |
| Display name | subschema |
| Id | organization |
| Description | Subschema representing an organization (colective) account. |
| Required | |
| Min Properties | |
| Max Properties | |
| Additional properties | false |
| Comments |
| Property | Value |
| Name | type |
| Technical name | |
| Id | |
| Type | string |
| Description | The type of the organization. Can be: Community, Government, Health care provider, Non-profit, Other, R&D, Startup, Traditional Company and University. All names are store in lowercase only. |
| Dependencies | |
| Required | true |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Min length | |
| Max length | |
| Pattern | |
| Format | |
| Enum | startup,traditional company,community,government,r&d,non-profit,university,health care provider,other |
| Sample | |
| Comments |
| Property | Value |
| Name | industry |
| Technical name | |
| Id | |
| Type | string |
| Description | Industry from which the organization participates. Plan is for this values to be scraped from linkedin industries. |
| Dependencies | |
| Required | true |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Min length | |
| Max length | |
| Pattern | |
| Format | |
| Enum | |
| Sample | |
| Comments |
| Property | Value |
| Name | name |
| Technical name | |
| Id | |
| Type | string |
| Description | Organization's name. |
| Dependencies | |
| Required | true |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Min length | |
| Max length | |
| Pattern | |
| Format | |
| Enum | |
| Sample | |
| Comments |
| Field | Type | Req | Key | Description | Comments |
| volunteers | boolean | true | Flag to indicate wheter the organization is seeking volunteers through the app. | ||
| donations | boolean | true | Flag to indicate wheter the organization is seeking donations through the app. | ||
| staff | boolean | true | Flag to indicate wheter the organization is seeking staff through the app. | ||
| other | boolean | true | Flag to indicate wheter the organization is seeking other needs through the app. |
| Property | Value |
| Name | needs |
| Technical name | |
| Id | |
| Type | document |
| Description | Document with what are the objectives of the organization through the application, such as finding volunteers, staff, investors and donors. |
| Dependencies | |
| Required | true |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| DBRef | |
| Min Properties | |
| Max Properties | |
| Additional properties | false |
| Comments |
| Property | Value |
| Name | volunteers |
| Technical name | |
| Id | |
| Type | boolean |
| Description | Flag to indicate wheter the organization is seeking volunteers through the app. |
| Dependencies | |
| Required | true |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | false |
| Sample | true |
| Comments |
| Property | Value |
| Name | donations |
| Technical name | |
| Id | |
| Type | boolean |
| Description | Flag to indicate wheter the organization is seeking donations through the app. |
| Dependencies | |
| Required | true |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | false |
| Sample | false |
| Comments |
| Property | Value |
| Name | staff |
| Technical name | |
| Id | |
| Type | boolean |
| Description | Flag to indicate wheter the organization is seeking staff through the app. |
| Dependencies | |
| Required | true |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | false |
| Sample | false |
| Comments |
| Property | Value |
| Name | other |
| Technical name | |
| Id | |
| Type | boolean |
| Description | Flag to indicate wheter the organization is seeking other needs through the app. |
| Dependencies | |
| Required | true |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | false |
| Sample | false |
| Comments |
| Property | Value |
| Name | global |
| Technical name | |
| Id | |
| Type | boolean |
| Description | Flag to indicate wheter this organization is global. |
| Dependencies | |
| Required | false |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | false |
| Sample | |
| Comments |
| Field | Type | Req | Key | Description | Comments |
| string | false | URL to organization's Linkedin page. | |||
| string | false | URL to organization's Twitter page. | |||
| website | string | false | URL to organization's website. | ||
| playstore | string | false | URL to organization's page at Google Play Store. | ||
| appstore | string | false | URL to organization's page at Apple App Store |
| Property | Value |
| Name | urls |
| Technical name | |
| Id | |
| Type | document |
| Description | Document holding external urls and refs to the organization such as social media profiles. |
| Dependencies | |
| Required | false |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| DBRef | |
| Min Properties | |
| Max Properties | |
| Additional properties | false |
| Comments |
| Property | Value |
| Name | |
| Technical name | |
| Id | |
| Type | string |
| Description | URL to organization's Linkedin page. |
| Dependencies | |
| Required | false |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Min length | |
| Max length | |
| Pattern | |
| Format | uri |
| Enum | |
| Sample | http://linkedin.com/in/myProfile |
| Comments |
| Property | Value |
| Name | |
| Technical name | |
| Id | |
| Type | string |
| Description | URL to organization's Twitter page. |
| Dependencies | |
| Required | false |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Min length | |
| Max length | |
| Pattern | |
| Format | uri |
| Enum | |
| Sample | http://twitter.com/myProfile |
| Comments |
| Property | Value |
| Name | website |
| Technical name | |
| Id | |
| Type | string |
| Description | URL to organization's website. |
| Dependencies | |
| Required | false |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Min length | |
| Max length | |
| Pattern | |
| Format | uri |
| Enum | |
| Sample | http://mypersonalwebsite.com |
| Comments |
| Property | Value |
| Name | playstore |
| Technical name | |
| Id | |
| Type | string |
| Description | URL to organization's page at Google Play Store. |
| Dependencies | |
| Required | false |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Min length | |
| Max length | |
| Pattern | |
| Format | uri |
| Enum | |
| Sample | http://playstore.com/myOrg |
| Comments |
| Property | Value |
| Name | appstore |
| Technical name | |
| Id | |
| Type | string |
| Description | URL to organization's page at Apple App Store |
| Dependencies | |
| Required | false |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Min length | |
| Max length | |
| Pattern | |
| Format | uri |
| Enum | |
| Sample | http://appstore.com/myOrg |
| Comments |
| Property | Value |
| Name | language |
| Technical name | |
| Id | |
| Type | string |
| Description | Field to inidicate the language used by the organization. |
| Dependencies | |
| Required | false |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Min length | |
| Max length | |
| Pattern | |
| Format | |
| Enum | |
| Sample | |
| Comments |
| Field | Type | Req | Key | Description | Comments |
| subschema | subschema | false | Case where the user comes from social networks with a registration that uses email. In this case, the email field is required. This case covers the great majority of currently supported social network authentications. | ||
| subschema | subschema | false | Case where the user comes from social networks with a registration that allows the use of only the phone. In this case, the phone field is required, and the email isn't. An example of ocial network that falls into this case is Twitter. |
| Property | Value |
| Choice | anyOf |
| Description | |
| Comments |
| Field | Type | Req | Key | Description | Comments |
| string | true | User's email validated by a regex pattern. |
| Property | Value |
| Display name | subschema |
| Id | emailPK |
| Description | Case where the user comes from social networks with a registration that uses email. In this case, the email field is required. This case covers the great majority of currently supported social network authentications. |
| Required | |
| Min Properties | |
| Max Properties | |
| Additional properties | true |
| Comments |
| Property | Value |
| Name | |
| Technical name | |
| Id | |
| Type | string |
| Description | User's email validated by a regex pattern. |
| Dependencies | |
| Required | true |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Min length | |
| Max length | |
| Pattern | |
| Format | |
| Enum | |
| Sample | test_user@fightpandemics.com |
| Comments |
| Field | Type | Req | Key | Description | Comments |
| phone | string | true |
| Property | Value |
| Display name | subschema |
| Id | phonePK |
| Description | Case where the user comes from social networks with a registration that allows the use of only the phone. In this case, the phone field is required, and the email isn't. An example of ocial network that falls into this case is Twitter. |
| Required | |
| Min Properties | |
| Max Properties | |
| Additional properties | false |
| Comments |
| Property | Value |
| Name | phone |
| Technical name | |
| Id | |
| Type | string |
| Description | |
| Dependencies | |
| Required | true |
| Primary key | false |
| Foreign collection | |
| Foreign field | |
| Relationship type | |
| Default | |
| Min length | |
| Max length | |
| Pattern | |
| Format | |
| Enum | |
| Sample | |
| Comments |
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"title": "users",
"description": "Collection that holds all the data on system's users. \n\nThe users can be of **two types**: **(1) Individual**, representing a private user account; and **(2) Organization**, representing an organization of various types.\n\nThe field 'type' is used to differentiate between the two subschemas, with 'individual' representing private user accounts and \"Community\", \"Government\", \"Health care provider\", \"Non-profit\", \"Other\", \"R&D\", \"Startup\", \"Traditional Company\" and \"University\".",
"additionalProperties": true,
"properties": {
"createdAt": {
"type": "string",
"description": "Timestamp with the user's creation date",
"format": "date-time"
},
"_id": {
"type": "string",
"description": "Automatically generated _it as primary key.",
"pattern": "^[a-fA-F0-9]{24}$"
},
"updatedAt": {
"type": "string",
"description": "Timestamp indicating last update on the database.",
"format": "date-time"
},
"authId": {
"type": "string",
"description": "String holding the authentication service id (Auth0).\n\nThis field is a **foreign key to the user in the Auth0 database**, connecting through the user_id field."
},
"location": {
"$ref": "#model/definitions/location"
},
"about": {
"type": "string",
"description": "Small self-introduction, limited to 100 char"
},
"photo": {
"type": "string",
"description": "URI with the location of the profile's photo.",
"format": "uri"
}
},
"oneOf": [
{
"id": "individual",
"type": "object",
"description": "Subschema representing a individual account.",
"properties": {
"type": {
"type": "string",
"enum": [
"individual"
]
},
"firstName": {
"type": "string",
"description": "The first name of the user"
},
"lastName": {
"type": "string",
"description": "The last name of the user. Optional field."
},
"needs": {
"type": "object",
"description": "User's need in the app, representing what kind of help he/she needs",
"properties": {
"medicalHelp": {
"type": "boolean",
"description": "Flag to indicate wheter the user needs medical help. \nMarking this indicates he shows symptoms of COVID-19.",
"default": false
},
"otherHelp": {
"type": "boolean",
"description": "Flag to indicate wheter the user needs non-medical help, such as getting groceries, medice and etc..",
"default": false
}
},
"additionalProperties": false,
"required": [
"medicalHelp",
"otherHelp"
]
},
"objectives": {
"type": "object",
"description": "Document with what are the objectives of the user through the application, such as donating, volunteering or sharing information.",
"properties": {
"volunteer": {
"type": "boolean",
"description": "Flag to indicate wheter the user wants to volunteer for iniciatives through the app.",
"default": false
},
"donate": {
"type": "boolean",
"description": "Flag to indicate wheter the user wants to donate for iniciatives through the app.",
"default": false
},
"shareInformation": {
"type": "boolean",
"description": "Flag to indicate wheter the user wants to share information through the app.",
"default": true
}
},
"additionalProperties": false,
"required": [
"volunteer",
"donate",
"shareInformation"
]
},
"urls": {
"type": "object",
"description": "Document holding the user urls to external websites and social networks",
"properties": {
"facebook": {
"type": "string",
"description": "URL to user's Facebook page.",
"format": "uri"
},
"linkedin": {
"type": "string",
"description": "URL to user's Linkedin page.",
"format": "uri"
},
"twitter": {
"type": "string",
"description": "URL to user's Twitter page.",
"format": "uri"
},
"github": {
"type": "string",
"description": "URL to user's Github page.",
"format": "uri"
},
"website": {
"type": "string",
"description": "URL to user's personal website.",
"format": "uri"
}
},
"additionalProperties": false
}
},
"additionalProperties": true,
"required": [
"type",
"firstName",
"needs"
]
},
{
"id": "organization",
"type": "object",
"description": "Subschema representing an organization (colective) account.",
"properties": {
"type": {
"type": "string",
"description": "The type of the organization. Can be: Community, Government, Health care provider, Non-profit, Other, R&D, Startup, Traditional Company and University. All names are store in lowercase only.",
"enum": [
"startup",
"traditional company",
"community",
"government",
"r&d",
"non-profit",
"university",
"health care provider",
"other"
]
},
"industry": {
"type": "string",
"description": "Industry from which the organization participates. Plan is for this values to be scraped from linkedin industries."
},
"ownerId": {
"type": "string",
"description": "_id of the user who owns the organization.",
"pattern": "^[a-fA-F0-9]{24}$"
},
"name": {
"type": "string",
"description": "Organization's name.\n"
},
"needs": {
"type": "object",
"description": "Document with what are the objectives of the organization through the application, such as finding volunteers, staff, investors and donors.",
"properties": {
"volunteers": {
"type": "boolean",
"description": "Flag to indicate wheter the organization is seeking volunteers through the app.",
"default": false
},
"donations": {
"type": "boolean",
"description": "Flag to indicate wheter the organization is seeking donations through the app.",
"default": false
},
"staff": {
"type": "boolean",
"description": "Flag to indicate wheter the organization is seeking staff through the app.",
"default": false
},
"other": {
"type": "boolean",
"description": "Flag to indicate wheter the organization is seeking other needs through the app.",
"default": false
}
},
"additionalProperties": false,
"required": [
"volunteers",
"donations",
"staff",
"other"
]
},
"global": {
"type": "boolean",
"description": "Flag to indicate wheter this organization is global.",
"default": false
},
"urls": {
"type": "object",
"description": "Document holding external urls and refs to the organization such as social media profiles.",
"properties": {
"linkedin": {
"type": "string",
"description": "URL to organization's Linkedin page.",
"format": "uri"
},
"twitter": {
"type": "string",
"description": "URL to organization's Twitter page.",
"format": "uri"
},
"website": {
"type": "string",
"description": "URL to organization's website.",
"format": "uri"
},
"playstore": {
"type": "string",
"description": "URL to organization's page at Google Play Store.",
"format": "uri"
},
"appstore": {
"type": "string",
"description": "URL to organization's page at Apple App Store",
"format": "uri"
}
},
"additionalProperties": false
},
"language": {
"type": "string",
"description": "Field to inidicate the language used by the organization."
}
},
"additionalProperties": false,
"required": [
"type",
"industry",
"ownerId",
"name",
"needs"
]
}
],
"anyOf": [
{
"id": "emailPK",
"type": "object",
"description": "Case where the user comes from social networks with a registration that uses email. In this case, the email field is required. This case covers the great majority of currently supported social network authentications.",
"properties": {
"email": {
"type": "string",
"description": "User's email validated by a regex pattern.",
"format": "email"
}
},
"additionalProperties": true,
"required": [
"email"
]
},
{
"id": "phonePK",
"type": "object",
"description": "Case where the user comes from social networks with a registration that allows the use of only the phone. In this case, the phone field is required, and the email isn't. \n\nAn example of ocial network that falls into this case is Twitter.",
"properties": {
"phone": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"phone"
]
}
],
"required": [
"createdAt",
"_id",
"updatedAt",
"authId"
]
}{
"createdAt": ISODate("2016-04-08T15:06:21.595Z"),
"_id": ObjectId("507f1f77bcf86cd799439011"),
"updatedAt": ISODate("2016-04-08T15:06:21.595Z"),
"authId": "Lorem",
"location": {
"coordinates": [
35.26,
-32.83
],
"type": "Point",
"country": "Lorem",
"city": "Lorem",
"neighborhood": "Lorem",
"address": "Lorem"
},
"about": "Lorem",
"photo": "./resource.txt#frag01",
"type": "other",
"industry": "Lorem",
"ownerId": ObjectId("507f1f77bcf86cd799439011"),
"name": "Lorem",
"needs": {
"volunteers": true,
"donations": false,
"staff": false,
"other": false
},
"global": false,
"urls": {
"linkedin": "http://linkedin.com/in/myProfile",
"twitter": "http://twitter.com/myProfile",
"website": "http://mypersonalwebsite.com",
"playstore": "http://playstore.com/myOrg",
"appstore": "http://appstore.com/myOrg"
},
"language": "Lorem",
"email": "test_user@fightpandemics.com"
}use applicationDB;
db.createCollection( "users",{
"storageEngine": {
"wiredTiger": {}
},
"capped": false,
"validator": {
"$jsonSchema": {
"bsonType": "object",
"title": "users",
"description": "Collection that holds all the data on system's users. \n\nThe users can be of **two types**: **(1) Individual**, representing a private user account; and **(2) Organization**, representing an organization of various types.\n\nThe field 'type' is used to differentiate between the two subschemas, with 'individual' representing private user accounts and \"Community\", \"Government\", \"Health care provider\", \"Non-profit\", \"Other\", \"R&D\", \"Startup\", \"Traditional Company\" and \"University\".",
"additionalProperties": true,
"properties": {
"_id": {
"bsonType": "objectId",
"description": "Automatically generated _it as primary key."
},
"createdAt": {
"bsonType": "date",
"description": "Timestamp with the user's creation date"
},
"updatedAt": {
"bsonType": "date",
"description": "Timestamp indicating last update on the database."
},
"authId": {
"bsonType": "string",
"description": "String holding the authentication service id (Auth0).\n\nThis field is a **foreign key to the user in the Auth0 database**, connecting through the user_id field."
},
"location": {
"bsonType": "object",
"description": "Location document according to the norms of a [GeoJSON Object](https://docs.mongodb.com/manual/reference/geojson/ ).\nThe fields address, neighborhood, city, state and country are added to store the result of the geoprocessing.",
"properties": {
"coordinates": {
"bsonType": "array",
"description": "Array with the coordinates, specifying **longitude first** and **latitude second**, as default in the [GeoJSON](https://docs.mongodb.com/manual/reference/geojson/) definition.",
"additionalItems": true,
"minItems": 2,
"maxItems": 2,
"uniqueItems": false,
"items": [
{
"bsonType": "number",
"description": "Location longitude\n",
"minimum": -180,
"maximum": 180
},
{
"bsonType": "number",
"description": "Location latitude\n",
"minimum": -90,
"maximum": 90
}
]
},
"type": {
"bsonType": "string",
"description": "Type of the GeoJSON Object.\nPlease refer to the [official documentation](https://docs.mongodb.com/manual/reference/geojson/ ) for more information.\n\n**In our case, the value will always be of the type \"Point\".**",
"enum": [
"Point"
]
},
"country": {
"bsonType": "string",
"description": "String holding the country's name.\n"
},
"city": {
"bsonType": "string",
"description": "String holding the city's name."
},
"neighborhood": {
"bsonType": "string",
"description": "String holding the neighborhood's name."
},
"address": {
"bsonType": "string",
"description": "String holding the address (street, number and other details)."
}
},
"additionalProperties": false,
"required": [
"coordinates",
"type"
]
},
"about": {
"bsonType": "string",
"description": "Small self-introduction, limited to 100 char"
},
"photo": {
"bsonType": "string",
"description": "URI with the location of the profile's photo."
}
},
"oneOf": [
{
"bsonType": "object",
"description": "Subschema representing a individual account.",
"properties": {
"type": {
"bsonType": "string",
"enum": [
"individual"
]
},
"firstName": {
"bsonType": "string",
"description": "The first name of the user"
},
"lastName": {
"bsonType": "string",
"description": "The last name of the user. Optional field."
},
"needs": {
"bsonType": "object",
"description": "User's need in the app, representing what kind of help he/she needs",
"properties": {
"medicalHelp": {
"bsonType": "bool",
"description": "Flag to indicate wheter the user needs medical help. \nMarking this indicates he shows symptoms of COVID-19."
},
"otherHelp": {
"bsonType": "bool",
"description": "Flag to indicate wheter the user needs non-medical help, such as getting groceries, medice and etc.."
}
},
"additionalProperties": false,
"required": [
"medicalHelp",
"otherHelp"
]
},
"objectives": {
"bsonType": "object",
"description": "Document with what are the objectives of the user through the application, such as donating, volunteering or sharing information.",
"properties": {
"volunteer": {
"bsonType": "bool",
"description": "Flag to indicate wheter the user wants to volunteer for iniciatives through the app."
},
"donate": {
"bsonType": "bool",
"description": "Flag to indicate wheter the user wants to donate for iniciatives through the app."
},
"shareInformation": {
"bsonType": "bool",
"description": "Flag to indicate wheter the user wants to share information through the app."
}
},
"additionalProperties": false,
"required": [
"volunteer",
"donate",
"shareInformation"
]
},
"urls": {
"bsonType": "object",
"description": "Document holding the user urls to external websites and social networks",
"properties": {
"facebook": {
"bsonType": "string",
"description": "URL to user's Facebook page."
},
"linkedin": {
"bsonType": "string",
"description": "URL to user's Linkedin page."
},
"twitter": {
"bsonType": "string",
"description": "URL to user's Twitter page."
},
"github": {
"bsonType": "string",
"description": "URL to user's Github page."
},
"website": {
"bsonType": "string",
"description": "URL to user's personal website."
}
},
"additionalProperties": false
}
},
"additionalProperties": true,
"required": [
"type",
"firstName",
"needs"
]
},
{
"bsonType": "object",
"description": "Subschema representing an organization (colective) account.",
"properties": {
"type": {
"bsonType": "string",
"description": "The type of the organization. Can be: Community, Government, Health care provider, Non-profit, Other, R&D, Startup, Traditional Company and University. All names are store in lowercase only.",
"enum": [
"startup",
"traditional company",
"community",
"government",
"r&d",
"non-profit",
"university",
"health care provider",
"other"
]
},
"industry": {
"bsonType": "string",
"description": "Industry from which the organization participates. Plan is for this values to be scraped from linkedin industries."
},
"ownerId": {
"bsonType": "objectId",
"description": "_id of the user who owns the organization."
},
"name": {
"bsonType": "string",
"description": "Organization's name.\n"
},
"needs": {
"bsonType": "object",
"description": "Document with what are the objectives of the organization through the application, such as finding volunteers, staff, investors and donors.",
"properties": {
"volunteers": {
"bsonType": "bool",
"description": "Flag to indicate wheter the organization is seeking volunteers through the app."
},
"donations": {
"bsonType": "bool",
"description": "Flag to indicate wheter the organization is seeking donations through the app."
},
"staff": {
"bsonType": "bool",
"description": "Flag to indicate wheter the organization is seeking staff through the app."
},
"other": {
"bsonType": "bool",
"description": "Flag to indicate wheter the organization is seeking other needs through the app."
}
},
"additionalProperties": false,
"required": [
"volunteers",
"donations",
"staff",
"other"
]
},
"global": {
"bsonType": "bool",
"description": "Flag to indicate wheter this organization is global."
},
"urls": {
"bsonType": "object",
"description": "Document holding external urls and refs to the organization such as social media profiles.",
"properties": {
"linkedin": {
"bsonType": "string",
"description": "URL to organization's Linkedin page."
},
"twitter": {
"bsonType": "string",
"description": "URL to organization's Twitter page."
},
"website": {
"bsonType": "string",
"description": "URL to organization's website."
},
"playstore": {
"bsonType": "string",
"description": "URL to organization's page at Google Play Store."
},
"appstore": {
"bsonType": "string",
"description": "URL to organization's page at Apple App Store"
}
},
"additionalProperties": false
},
"language": {
"bsonType": "string",
"description": "Field to inidicate the language used by the organization."
}
},
"additionalProperties": false,
"required": [
"type",
"industry",
"ownerId",
"name",
"needs"
]
}
],
"anyOf": [
{
"bsonType": "object",
"description": "Case where the user comes from social networks with a registration that uses email. In this case, the email field is required. This case covers the great majority of currently supported social network authentications.",
"properties": {
"email": {
"bsonType": "string",
"description": "User's email validated by a regex pattern."
}
},
"additionalProperties": true,
"required": [
"email"
]
},
{
"bsonType": "object",
"description": "Case where the user comes from social networks with a registration that allows the use of only the phone. In this case, the phone field is required, and the email isn't. \n\nAn example of ocial network that falls into this case is Twitter.",
"properties": {
"phone": {
"bsonType": "string"
}
},
"additionalProperties": false,
"required": [
"phone"
]
}
],
"required": [
"createdAt",
"_id",
"updatedAt",
"authId"
]
}
},
"validationLevel": "off",
"validationAction": "warn"
});| Property | Value |
| Name | MessageNotification |
| Description | |
| Parent Collection | thread |
| Parent field | _id |
| Parent Cardinality | 1 |
| Child Collection | notifications |
| Child field | threadId |
| Child Cardinality | 1 |
| Comments |
| Property | Value |
| Name | Notification Receiver |
| Description | |
| Parent Collection | users |
| Parent field | _id |
| Parent Cardinality | 1 |
| Child Collection | notifications |
| Child field | id |
| Child Cardinality | 1 |
| Comments |
| Property | Value |
| Name | OrganizationNotification |
| Description | |
| Parent Collection | users |
| Parent field | _id |
| Parent Cardinality | 1 |
| Child Collection | notifications |
| Child field | organizationId |
| Child Cardinality | 1 |
| Comments |
| Property | Value |
| Name | PostNotification |
| Description | |
| Parent Collection | posts |
| Parent field | _id |
| Parent Cardinality | 1 |
| Child Collection | notifications |
| Child field | postId |
| Child Cardinality | 1 |
| Comments |
| Property | Value |
| Name | UserLikesComment |
| Description | Relation to represent the User's who liked a Comment. Even though this is a N-N relation, we opt to store the ids only at the Comment side as an array of _id (with the _id of the users who liked it). |
| Parent Collection | users |
| Parent field | _id |
| Parent Cardinality | n |
| Child Collection | comments |
| Child field | |
| Child Cardinality | n |
| Comments |
| Property | Value |
| Name | UserLikesPost |
| Description | Relation to represent the User's who liked a Post. Even though this is a N-N relation, we opt to store the ids only at the Post side as an array of _id (with the _id of the users who liked it). |
| Parent Collection | users |
| Parent field | _id |
| Parent Cardinality | n |
| Child Collection | posts |
| Child field | |
| Child Cardinality | n |
| Comments |
| Property | Value |
| Name | UserOwnsOrganization |
| Description | Relation between an User and an Organization created by him/her. Initially projected as 1-N, with only one User owning the Organization, it is though to later on be evolved into N-N, with many Users being able to manage the Organization with different roles. |
| Parent Collection | users |
| Parent field | _id |
| Parent Cardinality | 1 |
| Child Collection | users |
| Child field | ownerId |
| Child Cardinality | n |
| Comments |